Continue
How to Integrate with Continue VS Code
Continue is an open-source autopilot compatible with Visual Studio Code and JetBrains, offering the simplest method to code with any LLM (Local Language Model).
To integrate Jan with a local AI language model, follow the steps below:
Step 1: Installing Continue on Visal Studio Code
Follow this guide to install the Continue extension on Visual Studio Code
Step 2: Enable the Jan API Server
To set up Continue for use with Jan's Local Server, you must activate the Jan API Server with your chosen model.
-
Press the
<>
button. Jan will take you to the Local API Server section. -
Setup the server, which includes the IP Port, Cross-Origin-Resource-Sharing (CORS) and Verbose Server Logs.
-
Press the Start Server button
Step 3: Configure Continue to Use Jan's Local Server
- Go to the
~/.continue
directory.
- Mac
- Windows
- Linux
cd ~/.continue
C:/Users/<your_user_name>/.continue
cd ~/.continue
~/.continue/config.json
{
"models": [
{
"title": "Jan",
"provider": "openai",
"model": "mistral-ins-7b-q4",
"apiKey": "EMPTY",
"apiBase": "http://localhost:1337"
}
]
}
- Ensure the file has the following configurations:
- Ensure
openai
is selected as theprovider
. - Match the
model
with the one enabled in the Jan API Server. - Set
apiBase
tohttp://localhost:1337
. - Leave the
apiKey
field toEMPTY
.
- Ensure
Step 4: Ensure the Using Model Is Activated in Jan
- Navigate to
Settings
>Models
. - Activate the model you want to use in Jan by clicking the three dots (⋮) and select Start Model.
Try out Jan integration with Continue in Visual Studio Code
1. Asking questions about the code
- Highlight a code snippet and press
Command + Shift + M
to open the Left Panel. - Select Jan at the bottom and ask a question about the code, for example,
Explain this code
.
2. Editing the code with the help of a large language model
- Select a code snippet and use
Command + Shift + L
. - Enter your editing request, such as
Add comments to this code
.