You can get an API key from the Mistral
Dashboard. Note that the API key for Codestral
(codestral.mistral.ai) is different from for all other models
(api.mistral.ai). If you are using a Codestral API key, you should set the
apiBase
to https://codestral.mistral.ai/v1
. Otherwise, we will default to
using https://api.mistral.ai/v1
.
Chat model
We recommend configuring Mistral Large as your chat model.
models:
- name: Mistral Large
provider: mistral
model: mistral-large-latest
apiKey: <YOUR_MISTRAL_API_KEY>
roles:
- chat
models:
- name: Mistral Large
provider: mistral
model: mistral-large-latest
apiKey: <YOUR_MISTRAL_API_KEY>
roles:
- chat
{
"models": [
{
"title": "Mistral Large",
"provider": "mistral",
"model": "mistral-large-latest",
"apiKey": "<YOUR_MISTRAL_API_KEY>"
}
]
}
Autocomplete model
We recommend configuring Codestral as your autocomplete model.
models:
- name: Codestral
provider: mistral
model: codestral-latest
# apiBase: https://codestral.mistral.ai/v1 # Do this if you are using a Codestral API key
roles:
- autocomplete
models:
- name: Codestral
provider: mistral
model: codestral-latest
# apiBase: https://codestral.mistral.ai/v1 # Do this if you are using a Codestral API key
roles:
- autocomplete
{
"tabAutocompleteModel": {
"title": "Codestral",
"provider": "mistral",
"model": "codestral-latest"
// "apiBase": "https://codestral.mistral.ai/v1" // Do this if you are using a Codestral API key
}
}
Embeddings model
We recommend configuring Mistral Embed as your embeddings model.
models:
- name: Mistral Embed
provider: mistral
model: mistral-embed
apiKey: <YOUR_MISTRAL_API_KEY>
apiBase: https://api.mistral.ai/v1
roles:
- embed
models:
- name: Mistral Embed
provider: mistral
model: mistral-embed
apiKey: <YOUR_MISTRAL_API_KEY>
apiBase: https://api.mistral.ai/v1
roles:
- embed
{
"embeddingsProvider": {
"provider": "mistral",
"model": "mistral-embed",
"apiKey": "<YOUR_MISTRAL_API_KEY>",
"apiBase": "https://api.mistral.ai/v1"
}
}
Reranking model
Mistral currently does not offer any reranking models.
Click here to see a list of reranking model providers.