Mistral
信息
您可以从 Mistral 控制台 获取 API 密钥。请注意,Codestral (codestral.mistral.ai) 的 API 密钥与其他所有模型 (api.mistral.ai) 的 API 密钥不同。如果您使用的是 Codestral API 密钥,则应将 apiBase
设置为 https://codestral.mistral.ai/v1
。否则,我们将默认使用 https://api.mistral.ai/v1
。
聊天模型
我们建议将 Mistral Large 配置为您的聊天模型。
- YAML
- JSON
config.yaml
models:
- name: Mistral Large
provider: mistral
model: mistral-large-latest
apiKey: <YOUR_MISTRAL_API_KEY>
roles:
- chat
config.json
{
"models": [
{
"title": "Mistral Large",
"provider": "mistral",
"model": "mistral-large-latest",
"apiKey": "<YOUR_MISTRAL_API_KEY>"
}
]
}
自动补全模型
我们建议将 Codestral 配置为您的自动完成模型。
- YAML
- JSON
config.yaml
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
config.json
{
"tabAutocompleteModel": {
"title": "Codestral",
"provider": "mistral",
"model": "codestral-latest"
// "apiBase": "https://codestral.mistral.ai/v1" // Do this if you are using a Codestral API key
}
}
嵌入模型
我们建议将 Mistral Embed 配置为您的嵌入模型。
- YAML
- JSON
config.yaml
models:
- name: Mistral Embed
provider: mistral
model: mistral-embed
apiKey: <YOUR_MISTRAL_API_KEY>
apiBase: https://api.mistral.ai/v1
roles:
- embed
config.json
{
"embeddingsProvider": {
"provider": "mistral",
"model": "mistral-embed",
"apiKey": "<YOUR_MISTRAL_API_KEY>",
"apiBase": "https://api.mistral.ai/v1"
}
}
重排序模型
Mistral 目前不提供任何重排序模型。
点击此处 查看重排序模型提供商列表。