Skip to content

Commit 88ba301

Browse files
fpagnySamyOubouaziz
authored andcommitted
feat(genapi): update continue intellij idea tutorial (#5355)
* feat(genapi): update continue intellij idea tutorial * fix(genapi): add openai as continue provider plugin for intellij
1 parent e6d63dd commit 88ba301

File tree

1 file changed

+104
-43
lines changed

1 file changed

+104
-43
lines changed

pages/generative-apis/reference-content/adding-ai-to-intellij-using-continue.mdx

Lines changed: 104 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ This guide will help you integrate AI-powered code models into JetBrain's Intell
2424

2525
You can install Continue from the [JetBrains marketplace](https://plugins.jetbrains.com/plugin/22707-continue):
2626

27-
1. Open IntelliJ IDEA and go to **Preferences** (`Ctrl+Alt+S` on Windows/Linux, `Cmd+,` on macOS).
27+
1. Open IntelliJ IDEA and go to **Preferences/Settings** (`Ctrl+Alt+S` on Windows/Linux, `Cmd+,` on macOS).
2828
2. Navigate to **Plugins**, then click **Marketplace**.
2929
3. Search for **Continue** and click **Install**.
3030
4. Restart IntelliJ IDEA after installation.
@@ -38,54 +38,120 @@ To link Continue with Scaleway's Generative APIs, you can use built-in menus fro
3838
- Click **Continue** in the menu on the right. .
3939
- In the prompt section, click on **Select model** dropdown, then on **Add Chat model**.
4040
- Select **Scaleway** as provider.
41-
- Select the model you want to use (we recommend `Qwen 2.5 Coder 32b` to get started with).
41+
- Select the model you want to use (we recommend `Qwen 2.5 Coder 32b` to get started with chat and autocompletion only).
4242
- Enter your **Scaleway secret key**.
4343
<Message type="tip">
4444
To start with, we recommend you use a Scaleway secret key having access to your `default` Scaleway project.
4545
</Message>
4646

47-
These actions will edit automatically your `config.json` file. To edit it manually, see [Configure Continue through configuration file](#configure-continue-through-configuration-file).
47+
These actions will automatically edit your `config.yaml` file. To edit it manually, see [Configure Continue through configuration file](#configure-continue-through-configuration-file).
4848

4949
<Message type="note">
50-
Embeddings and autocomplete models are not yet supported through graphical interface configuration. To enable them, you need to edit the configuration manually, see [Configure Continue through configuration file](#configure-continue-through-configuration-file).
50+
Agents, embeddings and autocomplete models are not yet supported through graphical interface configuration. To enable them, you need to edit the configuration manually, see [Configure Continue through configuration file](#configure-continue-through-configuration-file).
5151
</Message>
5252

5353
### Configure Continue through configuration file
5454

5555
To link Continue with Scaleway’s Generative APIs, you need to configure the settings file:
5656

57-
1. Locate your Continue configuration directory:
58-
- **Linux/macOS**: `~/.continue/`
59-
- **Windows**: `%USERPROFILE%\.continue\`
60-
2. Create a `config.json` file inside this directory.
61-
3. Add the following configuration:
62-
```json
57+
- Open your `config.yaml` settings file:
58+
- If you have already configured a **Local Assistant**, click **Local Assistant** then click the **wheel icon** to open your existing `config.yaml`
59+
- Otherwise, create a `config.yaml` file inside your `.continue` directory.
60+
- Add the following configuration to enable Scaleway's Generative API. This configuration uses three different models for each task:
61+
- `devstral-small-2505` for agentic workflows through a chat interface
62+
- `qwen2.5-coder-32b` for autocompletion when editing a file
63+
- `bge-multilingual-gemma2` for embedding and retrieving code context
64+
```yaml
65+
name: Continue Config
66+
version: 0.0.1
67+
models:
68+
- name: Devstral - Scaleway
69+
provider: openai
70+
model: devstral-small-2505
71+
apiBase: https://api.scaleway.ai/v1/
72+
apiKey: ###SCW_SECRET_KEY###
73+
defaultCompletionOptions:
74+
maxTokens: 8000
75+
contextLength: 50000
76+
roles:
77+
- chat
78+
- apply
79+
- embed
80+
- edit
81+
capabilities:
82+
- tool_use
83+
- name: Autocomplete - Scaleway
84+
provider: openai
85+
model: qwen2.5-coder-32b
86+
apiBase: https://api.scaleway.ai/v1/
87+
apiKey: ###SCW_SECRET_KEY###
88+
defaultCompletionOptions:
89+
maxTokens: 8000
90+
contextLength: 50000
91+
roles:
92+
- autocomplete
93+
- name: Embeddings Model - Scaleway
94+
provider: openai
95+
model: bge-multilingual-gemma2
96+
apiBase: https://api.scaleway.ai/v1/
97+
apiKey: ###SCW_SECRET_KEY###
98+
roles:
99+
- embed
100+
embedOptions:
101+
maxChunkSize: 256
102+
maxBatchSize: 32
103+
context:
104+
- provider: problems
105+
- provider: tree
106+
- provider: url
107+
- provider: search
108+
- provider: folder
109+
- provider: codebase
110+
- provider: web
111+
params:
112+
n: 3
113+
- provider: open
114+
params:
115+
onlyPinned: true
116+
- provider: docs
117+
- provider: terminal
118+
- provider: code
119+
- provider: diff
120+
- provider: currentFile
121+
```
122+
- Save the file at the correct location:
123+
- Linux/macOS: `~/.continue/config.yaml`
124+
- Windows: `%USERPROFILE%\.continue\config.yaml`
125+
- In **Local Assistant**, click on **Reload config** or restart IntelliJ IDEA.
126+
127+
Alternatively, a `config.json` file can be used with the following format. Note that this format is deprecated, and we recommend using `config.yaml` instead.
128+
```json
129+
{
130+
"models": [
63131
{
64-
"models": [
65-
{
66-
"model": "qwen2.5-coder-32b-instruct",
67-
"title": "Qwen2.5 Coder",
68-
"provider": "scaleway",
69-
"apiKey": "###SCW_SECRET_KEY###"
70-
}
71-
],
72-
"embeddingsProvider": {
73-
"model": "bge-multilingual-gemma2",
74-
"provider": "scaleway",
75-
"apiKey": "###SCW_SECRET_KEY###"
76-
},
77-
"tabAutocompleteModel": {
78-
"model": "qwen2.5-coder-32b",
79-
"title": "Qwen2.5 Coder Autocomplete",
80-
"provider": "scaleway",
81-
"apiKey": "###SCW_SECRET_KEY###"
82-
}
132+
"model": "devstral-small-2505",
133+
"title": "Devstral - Scaleway",
134+
"provider": "openai",
135+
"apiKey": "###SCW_SECRET_KEY###"
83136
}
84-
```
85-
4. Save the file and restart IntelliJ IDEA.
137+
],
138+
"embeddingsProvider": {
139+
"model": "bge-multilingual-gemma2",
140+
"provider": "openai",
141+
"apiKey": "###SCW_SECRET_KEY###"
142+
},
143+
"tabAutocompleteModel": {
144+
"model": "qwen2.5-coder-32b",
145+
"title": "Autocomplete - Scaleway",
146+
"provider": "openai",
147+
"apiKey": "###SCW_SECRET_KEY###"
148+
}
149+
}
150+
```
151+
86152

87153
<Message type="tip">
88-
For more details on configuring `config.json`, refer to the [official Continue documentation](https://docs.continue.dev/reference).
154+
For more details on configuring `config.yaml`, refer to the [official Continue documentation](https://docs.continue.dev/reference).
89155
If you want to limit access to a specific Scaleway Project, you should add the field `"apiBase": "https://api.scaleway.ai/###PROJECT_ID###/v1/"` for each model (ie. `models`, `embeddingsProvider` and `tabAutocompleteModel`) since the default URL `https://api.scaleway.ai/v1/` can only be used with the `default` project.
90156
</Message>
91157

@@ -102,15 +168,10 @@ After configuring the API, activate Continue in IntelliJ IDEA:
102168

103169
## Going further
104170

105-
You can add additional parameters to configure your model behaviour by editing `config.json`.
106-
For instance, you can add the following `systemMessage` value to modify LLM messages `"role":"system"` and/or `"role":"developer"` and provide less verbose answers:
107-
```json
108-
{
109-
"models": [
110-
{
111-
"model": "...",
112-
"systemMessage": "You are an expert software developer. You give concise responses."
113-
}
114-
]
115-
}
171+
You can add more parameters to configure your model's behavior by editing `config.yaml`.
172+
For instance, you can add the following `chatOptions.baseSystemMessage` value to modify LLM messages `"role":"system"` and/or `"role":"developer"` and provide less verbose answers:
173+
```yaml
174+
model:...
175+
chatOptions:
176+
baseSystemMessage: "You are an expert developer. Only write concise answers."
116177
```

0 commit comments

Comments
 (0)