From e56de6a44b19c14f1d3b2bb2a64885bda0f57522 Mon Sep 17 00:00:00 2001 From: Nate Date: Mon, 16 Dec 2024 11:55:50 -0800 Subject: [PATCH] update codestral docs --- .../model-providers/top-level/mistral.md | 3 +- .../customize/tutorials/set-up-codestral.md | 35 +++---------------- 2 files changed, 7 insertions(+), 31 deletions(-) diff --git a/docs/docs/customize/model-providers/top-level/mistral.md b/docs/docs/customize/model-providers/top-level/mistral.md index ba9427c9f..2c1eb81e1 100644 --- a/docs/docs/customize/model-providers/top-level/mistral.md +++ b/docs/docs/customize/model-providers/top-level/mistral.md @@ -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 } } ``` diff --git a/docs/docs/customize/tutorials/set-up-codestral.md b/docs/docs/customize/tutorials/set-up-codestral.md index 020f3db56..c48fea653 100644 --- a/docs/docs/customize/tutorials/set-up-codestral.md +++ b/docs/docs/customize/tutorials/set-up-codestral.md @@ -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