Merge pull request #3406 from continuedev/nate/quick-edit-21df

update codestral docs
This commit is contained in:
Nate Sesti 2024-12-16 12:31:00 -08:00 • committed by GitHub
commit c184e1fbea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 31 deletions

View file

@ -5,7 +5,7 @@ slug: ../mistral
:::info
You can get an API key from the [Mistral Dashboard](https://console.mistral.ai). Note that the API key for Codestral (codestral.mistral.ai) is different from for all other models (api.mistral.ai).
You can get an API key from the [Mistral Dashboard](https://console.mistral.ai). 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`.
:::
@ -36,6 +36,7 @@ We recommend configuring **Codestral** as your autocomplete model.
"title": "Codestral",
"provider": "mistral",
"model": "codestral-latest"
// "apiBase": "https://codestral.mistral.ai/v1" // Do this if you are using a Codestral API key
}
}
```

View file

@ -12,37 +12,10 @@ keywords: [codestral, mistral, model setup]
2. Click on the gear icon in the bottom right corner of the Continue window to open `~/.continue/config.json` (MacOS) / `%userprofile%\.continue\config.json` (Windows)
3. Log in and create an API key on Mistral AI's La Plateforme [here](https://console.mistral.ai/codestral). Make sure you get an API key from the "Codestral" page, as an API key for the normal "api.mistral.ai" API will not work.
3. Log in and create an API key on Mistral AI's La Plateforme [here](https://console.mistral.ai/codestral). Make sure you get an API key from the "Codestral" page.
4. To use Codestral as your model for both `autocomplete` and `chat`, replace `[API_KEY]` with your Mistral API key below and add it to your `config.json` file:
```json title="config.json"
{
"models": [
{
"title": "Codestral",
"provider": "mistral",
"model": "codestral-latest",
"apiKey": "[API_KEY]"
}
],
"tabAutocompleteModel": {
"title": "Codestral",
"provider": "mistral",
"model": "codestral-latest",
"apiKey": "[API_KEY]"
}
}
```
5. If you run into any issues or have any questions, please join our Discord and post in the `#help` channel [here](https://discord.gg/EfJEfdFnDQ)
## Troubleshooting
### Temporary workaround for JetBrains
Mistral AI recently changed the API endpoint to `codestral.mistral.ai` instead of `api.mistral.ai`, and our updated JetBrains extension is waiting on approval from the store. In the meantime, you will have to specify apiBase as `https://codestral.mistral.ai/v1` in the config.json like this:
```json title="config.json"
{
"models": [
@ -51,7 +24,7 @@ Mistral AI recently changed the API endpoint to `codestral.mistral.ai` instead o
"provider": "mistral",
"model": "codestral-latest",
"apiKey": "[API_KEY]",
"apiBase": "https://codestral.mistral.ai/v1/"
"apiBase": "https://codestral.mistral.ai/v1"
}
],
"tabAutocompleteModel": {
@ -59,11 +32,13 @@ Mistral AI recently changed the API endpoint to `codestral.mistral.ai` instead o
"provider": "mistral",
"model": "codestral-latest",
"apiKey": "[API_KEY]",
"apiBase": "https://codestral.mistral.ai/v1/"
"apiBase": "https://codestral.mistral.ai/v1"
}
}
```
5. If you run into any issues or have any questions, please join our Discord and post in the `#help` channel [here](https://discord.gg/EfJEfdFnDQ)
### Ask for help on Discord
Please join our Discord and post in the `#help` channel [here](https://discord.gg/EfJEfdFnDQ) if you are having problems using Codestral