The supported model

Model and context length for Mistral.ai API support:

Mistral.ai Models

PlatformModel IdentifierNotes
mistral.aimistral/open-mistral-7b
mistral.aimistral/open-mixtral-8x7b
mistral.aimistral/mistral-small-latestLatest version, small model
mistral.aimistral/mistral-medium-latestLatest version, medium model
mistral.aimistral/mistral-large-latestLatest version, large model
mistral.aimixtral-8x7b-32768
from openai import OpenAI

client = OpenAI(
    api_key = "Own API key",
    base_url = "https://api.zgiai.com/v1"
)

chat_completion = client.chat.completions.create(
    messages=[
        {
            "role": "user",
            "content": "Who are you?",
        }
    ],
    model="mistral/open-mistral-7b ",
)
print(chat_completion.choices[0].message.content)

Was this page helpful?