codestral
model is good for code generation and editing.mistral-large-latest
model is good for most use-cases.open-mistral-nemo
is a free model that is good for most use-cases.pixtral-12b-2409
is a vision model that is good for OCR, transcribing documents, and image comparison. It is not always capable at tool calling.
Authentication
Set yourMISTRAL_API_KEY
environment variable. Get your key from here.
Example
UseMistral
with your Agent
:
View more examples here.
Params
Parameter | Type | Default | Description |
---|---|---|---|
id | str | "mistral-large-latest" | The id of the Mistral model to use |
name | str | "Mistral" | The name of the model |
provider | str | "Mistral" | The provider of the model |
api_key | Optional[str] | None | The API key for Mistral (defaults to MISTRAL_API_KEY env var) |
base_url | str | "https://api.mistral.ai/v1" | The base URL for the Mistral API |
MistralChat
is a subclass of the Model class and has access to the same params.