From ae8ab99bf3e18683a1ab850bea9522339d9d9fd7 Mon Sep 17 00:00:00 2001 From: Fred Bricon Date: Mon, 13 Jan 2025 16:40:25 +0100 Subject: [PATCH 001/316] Fix syntax highlighting for .class files Signed-off-by: Fred Bricon --- core/util/index.test.ts | 11 ++++++++--- core/util/index.ts | 16 ++++++++++++++-- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/core/util/index.test.ts b/core/util/index.test.ts index 74ee3ccc8..fc48a49b2 100644 --- a/core/util/index.test.ts +++ b/core/util/index.test.ts @@ -207,7 +207,7 @@ World it("should handle strings with only whitespace", () => { const result = dedent` - + `; expect(result).toBe(""); }); @@ -249,9 +249,9 @@ World it("should handle a string with only one non-empty line", () => { const result = dedent` - + Hello World! - + `; expect(result).toBe("Hello World!"); }); @@ -373,11 +373,16 @@ describe("getMarkdownLanguageTagForFile", () => { expect(getMarkdownLanguageTagForFile("test.py")).toBe("python"); expect(getMarkdownLanguageTagForFile("test.tsx")).toBe("tsx"); expect(getMarkdownLanguageTagForFile("test.java")).toBe("java"); + expect(getMarkdownLanguageTagForFile("test.class")).toBe("java"); expect(getMarkdownLanguageTagForFile("test.md")).toBe("markdown"); expect(getMarkdownLanguageTagForFile("test.sh")).toBe("shell"); expect(getMarkdownLanguageTagForFile("test.sql")).toBe("sql"); }); + it("should sanitize ranges from the extension", () => { + expect(getMarkdownLanguageTagForFile("test.java (1-5)")).toBe("java"); + }); + it("should return the extension if not in the known list", () => { expect(getMarkdownLanguageTagForFile("file.unknownext")).toBe("unknownext"); }); diff --git a/core/util/index.ts b/core/util/index.ts index 04dc6d567..4cb0f4920 100644 --- a/core/util/index.ts +++ b/core/util/index.ts @@ -74,6 +74,7 @@ export function getMarkdownLanguageTagForFile(filepath: string): string { tsx: "tsx", ts: "typescript", java: "java", + class:"java", //.class files decompile to Java go: "go", rb: "ruby", rs: "rust", @@ -96,17 +97,28 @@ export function getMarkdownLanguageTagForFile(filepath: string): string { ps1: "powershell", }; - const ext = filepath.split(".").pop(); + const ext = sanitizeExtension(filepath.split(".").pop()); return ext ? (extToLangMap[ext] ?? ext) : ""; } + +function sanitizeExtension(ext?: string): string|undefined { + if (ext) { + //ignore ranges in extension eg. "java (11-23)" + const match = ext.match(/^(\S+)\s*(\(.*\))?$/); + if (match) { + ext = match[1]; + } + } + return ext; +} + export function copyOf(obj: any): any { if (obj === null || obj === undefined) { return obj; } return JSON.parse(JSON.stringify(obj)); } -``; export function deduplicateArray( array: T[], From 16b9a21a34f4f91b2758458e16d35252eafeb1f0 Mon Sep 17 00:00:00 2001 From: Fred Bricon Date: Wed, 15 Jan 2025 19:07:24 +0100 Subject: [PATCH 002/316] Intercept Ollama errors before Webview, to display Download/Start options Signed-off-by: Fred Bricon --- core/util/ollamaHelper.ts | 8 +++--- .../src/autocomplete/completionProvider.ts | 6 ++--- extensions/vscode/src/commands.ts | 4 +++ extensions/vscode/src/webviewProtocol.ts | 25 ++++++++++++++++++- 4 files changed, 35 insertions(+), 8 deletions(-) diff --git a/core/util/ollamaHelper.ts b/core/util/ollamaHelper.ts index 1e9c52490..a00e869dd 100644 --- a/core/util/ollamaHelper.ts +++ b/core/util/ollamaHelper.ts @@ -11,7 +11,7 @@ export async function isOllamaInstalled(): Promise { }); } -export async function startLocalOllama(ide: IDE): Promise { +export async function startLocalOllama(ide: IDE): Promise { let startCommand: string | undefined; switch (process.platform) { @@ -20,16 +20,16 @@ export async function startLocalOllama(ide: IDE): Promise { break; case "win32"://Windows - startCommand = `& "ollama app.exe"\n`; + startCommand = "& \"ollama app.exe\"\n"; break; default: //Linux... - const start_script_path = path.resolve(__dirname, './start_ollama.sh'); + const start_script_path = path.resolve(__dirname, "./start_ollama.sh"); if (await ide.fileExists(`file:/${start_script_path}`)) { startCommand = `set -e && chmod +x ${start_script_path} && ${start_script_path}\n`; console.log(`Ollama Linux startup script at : ${start_script_path}`); } else { - ide.showToast("error", `Cannot start Ollama: could not find ${start_script_path}!`) + return ide.showToast("error", `Cannot start Ollama: could not find ${start_script_path}!`) } } if (startCommand) { diff --git a/extensions/vscode/src/autocomplete/completionProvider.ts b/extensions/vscode/src/autocomplete/completionProvider.ts index c10d4d5f1..b7680b686 100644 --- a/extensions/vscode/src/autocomplete/completionProvider.ts +++ b/extensions/vscode/src/autocomplete/completionProvider.ts @@ -44,11 +44,11 @@ export class ContinueCompletionProvider implements vscode.InlineCompletionItemProvider { private onError(e: any) { - const options = ["Documentation"]; + let options = ["Documentation"]; if (e.message.includes("Ollama may not be installed")) { options.push("Download Ollama"); } else if (e.message.includes("Ollama may not be running")) { - options.unshift("Start Ollama"); // We want "Start" to be the default choice + options = ["Start Ollama"]; // We want "Start" to be the only choice } if (e.message.includes("Please sign in with GitHub")) { @@ -70,7 +70,7 @@ export class ContinueCompletionProvider ); } else if (val === "Download Ollama") { vscode.env.openExternal(vscode.Uri.parse("https://ollama.ai/download")); - } else if (val == "Start Ollama") { + } else if (val === "Start Ollama") { startLocalOllama(this.ide); } }); diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index d8019cfe1..bbf1cfd74 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -33,6 +33,7 @@ import { Battery } from "./util/battery"; import { VsCodeIde } from "./VsCodeIde"; import type { VsCodeWebviewProtocol } from "./webviewProtocol"; +import { startLocalOllama } from "core/util/ollamaHelper"; let fullScreenPanel: vscode.WebviewPanel | undefined; @@ -1000,6 +1001,9 @@ const getCommandsMap: ( "continue.openAccountDialog": () => { sidebar.webviewProtocol?.request("openDialogMessage", "account"); }, + "continue.startLocalOllama": () => { + startLocalOllama(ide); + }, }; }; diff --git a/extensions/vscode/src/webviewProtocol.ts b/extensions/vscode/src/webviewProtocol.ts index bfbb37ce6..c5853d12a 100644 --- a/extensions/vscode/src/webviewProtocol.ts +++ b/extensions/vscode/src/webviewProtocol.ts @@ -81,6 +81,30 @@ export class VsCodeWebviewProtocol respond({ done: true, content: response ?? {}, status: "success" }); } } catch (e: any) { + let message = e.message; + //Intercept Ollama errors for special handling + if (message.includes("Ollama may not")) { + const options = []; + if (message.includes("be installed")) { + options.push("Download Ollama"); + } else if (message.includes("be running")) { + options.push("Start Ollama"); + } + if (options.length > 0) { + // Respond without an error, so the UI doesn't show the error component + respond({ done: true, status: "error" }); + // Show native vscode error message instead, with options to download/start Ollama + vscode.window.showErrorMessage(e.message, ...options).then(async (val) => { + if (val === "Download Ollama") { + vscode.env.openExternal(vscode.Uri.parse("https://ollama.ai/download")); + } else if (val === "Start Ollama") { + vscode.commands.executeCommand("continue.startLocalOllama"); + } + }); + return; + } + } + respond({ done: true, error: e.message, status: "error" }); const stringified = JSON.stringify({ msg }, null, 2); @@ -96,7 +120,6 @@ export class VsCodeWebviewProtocol return; } - let message = e.message; if (e.cause) { if (e.cause.name === "ConnectTimeoutError") { message = `Connection timed out. If you expect it to take a long time to connect, you can increase the timeout in config.json by setting "requestOptions": { "timeout": 10000 }. You can find the full config reference here: https://docs.continue.dev/reference/config`; From 3b7029350ba265ea1dcd70b7cbbdcdadac3a160a Mon Sep 17 00:00:00 2001 From: henry Date: Wed, 15 Jan 2025 17:54:05 -0600 Subject: [PATCH 003/316] full screen opens in front of vscode --- extensions/vscode/src/commands.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index d8019cfe1..b322d6afb 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -776,6 +776,7 @@ const getCommandsMap: ( sessionId, ); } + panel.reveal(); sessionLoader.dispose(); }); From e2d5f9b3fbe5cdc57fb3a319fdd0b283ae94a4b9 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Thu, 16 Jan 2025 23:19:23 -0800 Subject: [PATCH 004/316] json block titles --- docs/docs/customize/context-providers.md | 2 +- .../docs/customize/deep-dives/autocomplete.md | 2 +- docs/docs/customize/deep-dives/docs.md | 4 +- .../docs/customize/deep-dives/prompt-files.md | 2 +- .../customize/model-providers/moonshot.md | 15 ++--- .../customize/model-providers/more/asksage.md | 61 ++++++++++--------- .../model-providers/more/llamacpp.md | 2 +- .../customize/model-providers/more/vllm.md | 2 +- .../model-providers/top-level/anthropic.md | 2 +- .../model-providers/top-level/azure.md | 2 +- .../model-providers/top-level/openai.md | 16 ++++- .../model-providers/top-level/xAI.md | 8 --- docs/docs/customize/slash-commands.md | 5 +- docs/docs/customize/tools.md | 2 +- .../build-your-own-context-provider.md | 12 ++-- docs/docs/edit/how-to-customize.md | 16 ----- docs/docs/edit/how-to-customize.mdx | 44 +++++++++++++ docs/docs/troubleshooting.md | 2 +- .../model-providers/top-level/xai.md | 14 ++++- .../build-your-own-context-provider.md | 4 +- .../current/customize/tutorials/llama3.1.md | 2 +- 21 files changed, 131 insertions(+), 88 deletions(-) delete mode 100644 docs/docs/edit/how-to-customize.md create mode 100644 docs/docs/edit/how-to-customize.mdx diff --git a/docs/docs/customize/context-providers.md b/docs/docs/customize/context-providers.md index d49b38c93..2ab18613a 100644 --- a/docs/docs/customize/context-providers.md +++ b/docs/docs/customize/context-providers.md @@ -302,7 +302,7 @@ Reference the architecture and platform of your current operating system. The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a standard proposed by Anthropic to unify prompts, context, and tool use. Continue supports any MCP server with the MCP context provider. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then configure your `config.json` like this: -```json +```json title="config.json" { "experimental": { "modelContextProtocolServers": [ diff --git a/docs/docs/customize/deep-dives/autocomplete.md b/docs/docs/customize/deep-dives/autocomplete.md index 221a6d49f..3936643e5 100644 --- a/docs/docs/customize/deep-dives/autocomplete.md +++ b/docs/docs/customize/deep-dives/autocomplete.md @@ -7,7 +7,7 @@ keywords: [autocomplete] If you want to have the best autocomplete experience, we recommend using Codestral, which is available through the [Mistral API](https://console.mistral.ai/). To do this, obtain an API key and add it to your `config.json`: -```json +```json title="config.json" { "tabAutocompleteModel": { "title": "Codestral", diff --git a/docs/docs/customize/deep-dives/docs.md b/docs/docs/customize/deep-dives/docs.md index 58612106d..0d3913ccd 100644 --- a/docs/docs/customize/deep-dives/docs.md +++ b/docs/docs/customize/deep-dives/docs.md @@ -12,7 +12,7 @@ The [`@Docs` context provider](customize/context-providers.md#docs) allows you t To enable the `@Docs` context provider, you need to add it to the list of context providers in your `config.json` file. -```json +```json title="config.json" { "contextProviders": [ { @@ -53,7 +53,7 @@ To add multiple documentation sites, we recommend adding them in bulk to your `c The [configuration schema for docs](https://github.com/continuedev/continue/blob/v0.9.212-vscode/extensions/vscode/config_schema.json#L1943-L1973) is as follows: -```json +```json title="config.json" "docs": [ { "title": "Continue", diff --git a/docs/docs/customize/deep-dives/prompt-files.md b/docs/docs/customize/deep-dives/prompt-files.md index 7269a459a..a6cb58f1f 100644 --- a/docs/docs/customize/deep-dives/prompt-files.md +++ b/docs/docs/customize/deep-dives/prompt-files.md @@ -16,7 +16,7 @@ Below is a quick example of setting up a prompt file to de 2. Add a file called `rails.prompt` to this folder. 3. Write the following contents to `rails.prompt` and save. -``` +```.prompt name: Rails Project description: Information about this project --- diff --git a/docs/docs/customize/model-providers/moonshot.md b/docs/docs/customize/model-providers/moonshot.md index 64017d1bd..cba20fb82 100644 --- a/docs/docs/customize/model-providers/moonshot.md +++ b/docs/docs/customize/model-providers/moonshot.md @@ -9,7 +9,7 @@ To use Moonshot AI models, you need to: 1. Get an API key from [Moonshot AI Platform](https://platform.moonshot.cn/) 2. Add the following configuration to your `config.json`: -```json +```json title="config.json" { "models": [ { @@ -32,17 +32,17 @@ Moonshot AI currently provides the following models: ## Configuration Options -| Option | Description | Default | -|--------|-------------|---------| -| `apiKey` | Moonshot API key | Required | -| `apiBase` | API base URL | `https://api.moonshot.cn/v1/` | -| `model` | Model name to use | `moonshot-v1-8k` | +| Option | Description | Default | +| --------- | ----------------- | ----------------------------- | +| `apiKey` | Moonshot API key | Required | +| `apiBase` | API base URL | `https://api.moonshot.cn/v1/` | +| `model` | Model name to use | `moonshot-v1-8k` | ## Example Here's a complete configuration example: -```json +```json title="config.json" { "models": [ { @@ -58,3 +58,4 @@ Here's a complete configuration example: } ] } +``` diff --git a/docs/docs/customize/model-providers/more/asksage.md b/docs/docs/customize/model-providers/more/asksage.md index e21133cb8..382f6862f 100644 --- a/docs/docs/customize/model-providers/more/asksage.md +++ b/docs/docs/customize/model-providers/more/asksage.md @@ -2,7 +2,7 @@ :::info -To get an Ask Sage API key login to the Ask Sage platform (If you don't have an account, you can create one [here](https://chat.asksage.ai/)) and follow the instructions in the Ask Sage Docs:[Ask Sage API Key](https://docs.asksage.ai/docs/api-documentation/api-documentation.html) +To get an Ask Sage API key login to the Ask Sage platform (If you don't have an account, you can create one [here](https://chat.asksage.ai/)) and follow the instructions in the Ask Sage Docs:[Ask Sage API Key](https://docs.asksage.ai/docs/api-documentation/api-documentation.html) ::: @@ -10,12 +10,12 @@ To get an Ask Sage API key login to the Ask Sage platform (If you don't have an To use the Ask Sage models, the following configuration is required to the `config.json` file: -```json +```json title="config.json" { "models": [ { - "apiKey": "YOUR_API_KEY", - "apiBase": "https://api.asksage.ai/server/", // apiBase will be the same for all models, but will vary based on tenant. + "apiKey": "YOUR_API_KEY", + "apiBase": "https://api.asksage.ai/server/", // apiBase will be the same for all models, but will vary based on tenant. "model": "gpt4-gov", "title": "GPT-4 gov", "provider": "askSage" @@ -27,12 +27,13 @@ To use the Ask Sage models, the following configuration is required to the `conf The `apiBase` will be listed on the Ask Sage platform when you generate an `API key`. You will see context as shown below: > Server API for query/training etc.: +> > - Documentation: https://app.swaggerhub.com/apis-docs/NICOLASCHAILLAN_1/server_ask-sage_api/1.0 > - URL for this API is: https://api.asksage.ai/server/ ## Usage -Currently, the setup for the models provided by Ask Sage is to support the following two functionalities provided by Continue.Dev: +Currently, the setup for the models provided by Ask Sage is to support the following two functionalities provided by Continue.Dev: - `Chat` to understand and iterate on code in the sidebar - `Edit` to modify code without leaving your current file @@ -41,34 +42,34 @@ More models, functionalities and documentation will be added in the future for A > We recommend to utilize the`OpenAI` or `Anthropic` models for the best performance and results for the `Chat` and `Edit` functionalities. -## Ask Sage Documentation +## Ask Sage Documentation + Ask Sage documentation is not available with Continue.Dev, so if you have any questions or need help with Ask Sage type `@ask` and select the `Ask Sage` option in the chat. Then procced to ask your question about Ask Sage. ## Current Models From Ask Sage Supported The current Models available provided by Ask Sage are: -| Index | Model | Added | Status | -|-------|------------------------|-------|--------| -| 1 | GPT-4 Gov | Yes | ✅ | -| 2 | GPT-4o Gov | Yes | ✅ | -| 3 | GPT-4o-mini Gov | Yes | ✅ | -| 4 | GPT-3.5-Turbo Gov | Yes | ✅ | -| 5 | GPT-4o | Yes | ✅ | -| 6 | GPT-4o-mini | Yes | ✅ | -| 7 | GPT-4 | Yes | ✅ | -| 8 | GPT-4-32K | Yes | ✅ | -| 9 | GPT-o1 | Yes | ✅ | -| 10 | GPT-o1-mini | Yes | ✅ | -| 11 | GPT-3.5-turbo | Yes | ✅ | -| 12 | Calude 3.5 Sonnet Gov | Yes | ✅ | -| 13 | Calude 3 Opus | Yes | ✅ | -| 14 | Calude 3 Sonet | Yes | ✅ | -| 15 | Calude 3.5 Sonnet | Yes | ✅ | -| 16 | Grok (xAI) | Yes | ✅ | -| 17 | Groq Llama 3.3 | Yes | ✅ | -| 18 | Groq 70B | Yes | ✅ | -| 19 | Gemini Pro | Yes | ✅ | -| 20 | llama 3 | Yes | ✅ | -| 21 | Mistral Large | Yes | ✅ | - +| Index | Model | Added | Status | +| ----- | --------------------- | ----- | ------ | +| 1 | GPT-4 Gov | Yes | ✅ | +| 2 | GPT-4o Gov | Yes | ✅ | +| 3 | GPT-4o-mini Gov | Yes | ✅ | +| 4 | GPT-3.5-Turbo Gov | Yes | ✅ | +| 5 | GPT-4o | Yes | ✅ | +| 6 | GPT-4o-mini | Yes | ✅ | +| 7 | GPT-4 | Yes | ✅ | +| 8 | GPT-4-32K | Yes | ✅ | +| 9 | GPT-o1 | Yes | ✅ | +| 10 | GPT-o1-mini | Yes | ✅ | +| 11 | GPT-3.5-turbo | Yes | ✅ | +| 12 | Calude 3.5 Sonnet Gov | Yes | ✅ | +| 13 | Calude 3 Opus | Yes | ✅ | +| 14 | Calude 3 Sonet | Yes | ✅ | +| 15 | Calude 3.5 Sonnet | Yes | ✅ | +| 16 | Grok (xAI) | Yes | ✅ | +| 17 | Groq Llama 3.3 | Yes | ✅ | +| 18 | Groq 70B | Yes | ✅ | +| 19 | Gemini Pro | Yes | ✅ | +| 20 | llama 3 | Yes | ✅ | +| 21 | Mistral Large | Yes | ✅ | diff --git a/docs/docs/customize/model-providers/more/llamacpp.md b/docs/docs/customize/model-providers/more/llamacpp.md index 7dbdd47ca..8cb367e3f 100644 --- a/docs/docs/customize/model-providers/more/llamacpp.md +++ b/docs/docs/customize/model-providers/more/llamacpp.md @@ -2,7 +2,7 @@ Run the llama.cpp server binary to start the API server. If running on a remote server, be sure to set host to 0.0.0.0: -```shell +```bash .\server.exe -c 4096 --host 0.0.0.0 -t 16 --mlock -m models\meta\llama\codellama-7b-instruct.Q8_0.gguf ``` diff --git a/docs/docs/customize/model-providers/more/vllm.md b/docs/docs/customize/model-providers/more/vllm.md index fe6932cc5..594f0b428 100644 --- a/docs/docs/customize/model-providers/more/vllm.md +++ b/docs/docs/customize/model-providers/more/vllm.md @@ -5,6 +5,7 @@ vLLM is an open-source library for fast LLM inference which typically is used to ```shell vllm serve meta-llama/Meta-Llama-3.1-8B-Instruct ``` + ## Chat model We recommend configuring **Llama3.1 8B** as your chat model. @@ -55,5 +56,4 @@ We recommend configuring **Nomic Embed Text** as your embeddings model. [Click here](../../model-types/reranking.md) to see a list of reranking model providers. - The continue implementation uses [OpenAI](../top-level/openai.md) under the hood. [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Vllm.ts) diff --git a/docs/docs/customize/model-providers/top-level/anthropic.md b/docs/docs/customize/model-providers/top-level/anthropic.md index 9333a8e84..963734fd4 100644 --- a/docs/docs/customize/model-providers/top-level/anthropic.md +++ b/docs/docs/customize/model-providers/top-level/anthropic.md @@ -50,7 +50,7 @@ Anthropic supports [prompt caching with Claude](https://docs.anthropic.com/en/do To enable caching of the system message and the turn-by-turn conversation, update your your model configuration as following: -```json +```json title="config.json" { "models": [ { diff --git a/docs/docs/customize/model-providers/top-level/azure.md b/docs/docs/customize/model-providers/top-level/azure.md index 45b49f734..ccf8b814e 100644 --- a/docs/docs/customize/model-providers/top-level/azure.md +++ b/docs/docs/customize/model-providers/top-level/azure.md @@ -79,7 +79,7 @@ To find this information in _Azure AI Foundry_, first select the model that you For example, a Target URI of `https://just-an-example.openai.azure.com/openai/deployments/gpt-4o-july/chat/completions?api-version=2023-03-15-preview` would map to the following: -```json +```json title="config.json" { "title": "GPT-4o Azure", "model": "gpt-4o", diff --git a/docs/docs/customize/model-providers/top-level/openai.md b/docs/docs/customize/model-providers/top-level/openai.md index 6b31b0b22..40126fb9b 100644 --- a/docs/docs/customize/model-providers/top-level/openai.md +++ b/docs/docs/customize/model-providers/top-level/openai.md @@ -86,8 +86,18 @@ If you are using an OpenAI compatible server / API, you can change the `apiBase` } ``` -To force usage of `chat/completions` instead of `completions` endpoint you can set +To force usage of `chat/completions` instead of `completions` endpoint you can set: -```json -"useLegacyCompletionsEndpoint": false +```json title="config.json" +{ + "models": [ + { + "title": "OpenAI-compatible server / API", + "provider": "openai", + "model": "MODEL_NAME", + "apiBase": "http://localhost:8000/v1", + "useLegacyCompletionsEndpoint": true + } + ] +} ``` diff --git a/docs/docs/customize/model-providers/top-level/xAI.md b/docs/docs/customize/model-providers/top-level/xAI.md index fbdfa83ad..9bf23be83 100644 --- a/docs/docs/customize/model-providers/top-level/xAI.md +++ b/docs/docs/customize/model-providers/top-level/xAI.md @@ -43,11 +43,3 @@ xAI currently does not offer any embeddings models. xAI currently does not offer any reranking models. [Click here](../../model-types/reranking.md) to see a list of reranking model providers. - -## Legacy Completions - -To force usage of `chat/completions` instead of `completions` endpoint you can set - -```json -"useLegacyCompletionsEndpoint": false -``` diff --git a/docs/docs/customize/slash-commands.md b/docs/docs/customize/slash-commands.md index bc3bac24a..f640b715f 100644 --- a/docs/docs/customize/slash-commands.md +++ b/docs/docs/customize/slash-commands.md @@ -111,7 +111,7 @@ The onboard slash command helps to familiarize yourself with a new project by an The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a standard proposed by Anthropic to unify prompts, context, and tool use. Continue supports MCP "prompts" by creating slash commands. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then configure your `config.json` like this: -```json +```json title="config.json" { "experimental": { "modelContextProtocolServers": [ @@ -128,4 +128,5 @@ The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a ``` ### Build your own Slash Command -You can build your own slash command by following [this tutorial](/customize/tutorials/build-your-own-slash-command). \ No newline at end of file + +You can build your own slash command by following [this tutorial](/customize/tutorials/build-your-own-slash-command). diff --git a/docs/docs/customize/tools.md b/docs/docs/customize/tools.md index 020c38459..fe461d1bd 100644 --- a/docs/docs/customize/tools.md +++ b/docs/docs/customize/tools.md @@ -23,7 +23,7 @@ To let you balance speed and safety, each tool can be set to 1 of 3 modes: Currently custom tools can be configured using the [Model Context Protocol](https://modelcontextprotocol.io/introduction), a standard proposed by Anthropic to unify prompts, context, and tool use. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then configure your `config.json` like this: -```json title="~/.continue/config.json" +```json title="config.json" { "experimental": { "modelContextProtocolServers": [ diff --git a/docs/docs/customize/tutorials/build-your-own-context-provider.md b/docs/docs/customize/tutorials/build-your-own-context-provider.md index 3d37790cd..fae404cd4 100644 --- a/docs/docs/customize/tutorials/build-your-own-context-provider.md +++ b/docs/docs/customize/tutorials/build-your-own-context-provider.md @@ -107,17 +107,19 @@ const ReadMeContextProvider: CustomContextProvider = { const { ide } = args; // Filter all workspace files for READMEs - const workspaceDirs = await ide.getWorkspaceDirs() + const workspaceDirs = await ide.getWorkspaceDirs(); const allFiles = await Promise.all( - workspaceDirs.map(dir => ide.subprocess(`find ${dir} -name "README.md"`)), + workspaceDirs.map((dir) => + ide.subprocess(`find ${dir} -name "README.md"`), + ), ); // 'readmes' now contains an array of file paths for each README.md file found in the workspace, // excluding those in 'node_modules' const readmes = allFiles - .flatMap(mds => mds[0].split("\n")) - .filter(file => file.trim() !== '' && !file.includes("/node_modules/")) + .flatMap((mds) => mds[0].split("\n")) + .filter((file) => file.trim() !== "" && !file.includes("/node_modules/")); // Return the items that will be shown in the dropdown return readmes.map((filepath) => { @@ -182,7 +184,7 @@ Continue will use [esbuild](https://esbuild.github.io/) to bundle your `config.t If you'd like to write a context provider in a language other than TypeScript, you can use the "http" context provider to call a server that hosts your own code. Add the context provider to `config.json` like this: -```json +```json title="config.json" { "name": "http", "params": { diff --git a/docs/docs/edit/how-to-customize.md b/docs/docs/edit/how-to-customize.md deleted file mode 100644 index aa9d464c7..000000000 --- a/docs/docs/edit/how-to-customize.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: How to customize -sidebar_position: 5 -description: How to customize Edit -keywords: [edit, cmd i, works] ---- - -You can configure a particular model to be used for Edit using the `inlineEdit` property. - -```json title="config.json" -"experimental": { - "modelRoles": { - "inlineEdit": "MODEL_TITLE", - } -} -``` \ No newline at end of file diff --git a/docs/docs/edit/how-to-customize.mdx b/docs/docs/edit/how-to-customize.mdx new file mode 100644 index 000000000..25d1680f1 --- /dev/null +++ b/docs/docs/edit/how-to-customize.mdx @@ -0,0 +1,44 @@ +--- +title: How to customize +sidebar_position: 5 +description: How to customize Edit +keywords: [edit, cmd i, works] +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +You can configure a particular model to be used for Edit: + + + + Use model roles. + ```yaml title="Package or config.yaml" + models: + - name: Claude 3.5 Sonnet + provider: anthropic + model: claude-3-5-sonnet-latest + roles: + - edit + apiKeySecret: ANTHOPIC_API_KEY + ``` + + + Set the `experimental.modelRoles.inlineEdit` property in `config.json`. + ```json title="config.json" + { + "models": { + "name": "Claude 3.5 Sonnet", + "provider": "anthropic", + "model": "claude-3-5-sonnet-latest", + "apiKey": "[API_KEY]" + }, + "experimental": { + "modelRoles": { + "inlineEdit": "Claude 3.5 Sonnet", + } + } + } + ``` + + diff --git a/docs/docs/troubleshooting.md b/docs/docs/troubleshooting.md index d4bbe69db..a8632457e 100644 --- a/docs/docs/troubleshooting.md +++ b/docs/docs/troubleshooting.md @@ -85,7 +85,7 @@ If your keyboard shortcuts are not resolving, you may have other commands that a If you're seeing a `fetch failed` error and your network requires custom certificates, you will need to configure them in `config.json`. In each of the objects in the `"models"` array, add `requestOptions.caBundlePath` like this: -```json +```json title="config.json" { "models": [ { diff --git a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/model-providers/top-level/xai.md b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/model-providers/top-level/xai.md index fbdfa83ad..c920114b0 100644 --- a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/model-providers/top-level/xai.md +++ b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/model-providers/top-level/xai.md @@ -46,8 +46,16 @@ xAI currently does not offer any reranking models. ## Legacy Completions -To force usage of `chat/completions` instead of `completions` endpoint you can set +To force usage of `chat/completions` instead of `completions` endpoint you can set `useLegacyCompletionsEndpoint` to `true`: -```json -"useLegacyCompletionsEndpoint": false +```json title="config.json" + "models": [ + { + "title": "Grok Beta", + "provider": "xAI", + "model": "grok-beta", + "apiKey": "[API_KEY]", + "useLegacyCompletionsEndpoint": false + } + ] ``` diff --git a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/tutorials/build-your-own-context-provider.md b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/tutorials/build-your-own-context-provider.md index 735f405de..abe3612ce 100644 --- a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/tutorials/build-your-own-context-provider.md +++ b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/tutorials/build-your-own-context-provider.md @@ -68,7 +68,7 @@ export function modifyConfig(config: Config): Config { } ``` -不需要对 `config.json` 做修改。 +不需要对 `config.json` 做修改。 ## 定制有 submenu 或 query 的上下文提供者 @@ -174,7 +174,7 @@ Continue 将使用 [esbuild](https://esbuild.github.io/) 打包你的 `config.ts 如果你想要用除了 TypeScript 的其他语言编写上下文提供者,你可以使用 "http" 上下文提供者,来调用一个托管你自己代码的服务器。添加上下文提供者到 `config.json` ,像这样: -```json +```json title="config.json" { "name": "http", "params": { diff --git a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/tutorials/llama3.1.md b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/tutorials/llama3.1.md index e02ba6741..877864a15 100644 --- a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/tutorials/llama3.1.md +++ b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/tutorials/llama3.1.md @@ -99,7 +99,7 @@ SambaNova Cloud 提供 Llama3.1 70B/405B 服务的世界记录。 2. 复制你的 API key 3. 更新你的 Continue 配置文件像这样: -```json title="~/.continue/config.json" +```json title="config.json" { "models": [ { From adb852f0c4bcd705718e217f661dd5243a5b67dd Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Thu, 16 Jan 2025 23:22:48 -0800 Subject: [PATCH 005/316] deprecated json titles --- docs/docs/actions/how-to-use-it.md | 2 +- docs/docs/autocomplete/how-to-customize.md | 2 +- docs/docs/autocomplete/model-setup.md | 8 ++- docs/docs/chat/model-setup.mdx | 22 +++---- docs/docs/customize/context-providers.md | 64 +++++++++---------- .../docs/customize/deep-dives/autocomplete.md | 6 +- docs/docs/customize/deep-dives/codebase.md | 2 +- docs/docs/customize/deep-dives/docs.md | 8 +-- .../customize/model-providers/moonshot.md | 4 +- .../model-providers/more/SambaNova.md | 2 +- .../customize/model-providers/more/asksage.md | 2 +- .../model-providers/more/cerebras.md | 2 +- .../model-providers/more/cloudflare.md | 2 +- .../customize/model-providers/more/cohere.md | 6 +- .../model-providers/more/deepinfra.md | 2 +- .../customize/model-providers/more/flowise.md | 2 +- .../model-providers/more/function-network.md | 7 +- .../customize/model-providers/more/groq.md | 2 +- .../more/huggingfaceinferenceapi.md | 2 +- .../model-providers/more/ipex_llm.md | 4 +- .../customize/model-providers/more/kindo.md | 4 +- .../model-providers/more/llamacpp.md | 2 +- .../model-providers/more/llamafile.md | 2 +- .../model-providers/more/lmstudio.md | 6 +- .../customize/model-providers/more/msty.md | 4 +- .../customize/model-providers/more/nebius.md | 4 +- .../customize/model-providers/more/novita.md | 2 +- .../customize/model-providers/more/nvidia.md | 4 +- .../model-providers/more/openrouter.md | 4 +- .../model-providers/more/replicatellm.md | 2 +- .../model-providers/more/sagemaker.md | 4 +- .../model-providers/more/scaleway.md | 6 +- .../model-providers/more/siliconflow.md | 4 +- .../model-providers/more/textgenwebui.md | 2 +- .../model-providers/more/together.md | 2 +- .../customize/model-providers/more/vllm.md | 6 +- .../model-providers/top-level/anthropic.md | 4 +- .../model-providers/top-level/azure.md | 8 +-- .../model-providers/top-level/bedrock.md | 12 ++-- .../model-providers/top-level/deepseek.md | 4 +- .../model-providers/top-level/gemini.md | 4 +- .../model-providers/top-level/mistral.md | 6 +- .../model-providers/top-level/ollama.md | 8 +-- .../model-providers/top-level/openai.md | 8 +-- .../model-providers/top-level/vertexai.md | 6 +- .../model-providers/top-level/xAI.md | 2 +- docs/docs/customize/model-types/embeddings.md | 6 +- docs/docs/customize/model-types/reranking.md | 10 +-- docs/docs/customize/slash-commands.md | 14 ++-- docs/docs/customize/tools.md | 2 +- .../build-your-own-context-provider.md | 2 +- .../tutorials/build-your-own-slash-command.md | 2 +- .../customize/tutorials/custom-code-rag.md | 2 +- .../tutorials/how-to-self-host-a-model.md | 6 +- docs/docs/customize/tutorials/llama3.1.md | 10 +-- .../customize/tutorials/set-up-codestral.md | 2 +- docs/docs/edit/how-to-customize.mdx | 4 +- docs/docs/reference.md | 26 ++++---- docs/docs/telemetry.md | 2 +- docs/docs/troubleshooting.md | 2 +- docs/docs/yaml-migration.md | 12 ++-- 61 files changed, 189 insertions(+), 184 deletions(-) diff --git a/docs/docs/actions/how-to-use-it.md b/docs/docs/actions/how-to-use-it.md index 5be83b2e7..80f057453 100644 --- a/docs/docs/actions/how-to-use-it.md +++ b/docs/docs/actions/how-to-use-it.md @@ -36,7 +36,7 @@ Below is a quick example of setting up a prompt file to write unit tests using J 2. Add a file called `test.prompt` to this folder. The name of this file will be the name of the slash command you will use to generate your prompt. 3. Write the following contents to `test.prompt` and save. -``` +```.prompt {{{ input }}} Write unit tests for the above selected code, following each of these instructions: diff --git a/docs/docs/autocomplete/how-to-customize.md b/docs/docs/autocomplete/how-to-customize.md index ccd1dca9d..066621368 100644 --- a/docs/docs/autocomplete/how-to-customize.md +++ b/docs/docs/autocomplete/how-to-customize.md @@ -7,7 +7,7 @@ sidebar_position: 5 Continue offers a handful of parameters in [`config.json`](../reference.md) that can be tuned to find the perfect balance between suggestion quality and system performance for your specific needs and hardware capabilities: -```json title="config.json" +```json title="config.json (Deprecated)" "tabAutocompleteOptions": { "maxPromptTokens": 400, "prefixPercentage": 0.5, diff --git a/docs/docs/autocomplete/model-setup.md b/docs/docs/autocomplete/model-setup.md index 7d8c98944..c42c8318c 100644 --- a/docs/docs/autocomplete/model-setup.md +++ b/docs/docs/autocomplete/model-setup.md @@ -13,7 +13,7 @@ This page recommends models and providers for Autocomplete. Read more about how For the best Autocomplete experience, we recommend using Codestral through the [Mistral API](https://console.mistral.ai/). This model offers high-quality completions with an excellent understanding of code context: -```json title="config.json"" +```json title="config.json (Deprecated)"" { "tabAutocompleteModel": { "title": "Codestral", @@ -32,7 +32,7 @@ The API keys for Codestral and the general Mistral APIs are different. If you ar For those preferring local execution or self-hosting,`Qwen2.5-Coder 1.5B` offers a good balance of performance and quality for most users (e.g. using [Ollama](../customize/model-providers/top-level/ollama.md) or [LM Studio](../customize/model-providers/more/lmstudio.md)). -```json title="config.json"" +```json title="config.json (Deprecated)"" { "tabAutocompleteModel": { "title": "Qwen2.5-Coder 1.5B", @@ -49,11 +49,12 @@ Have more compute? Use `qwen2.5-coder:7b-base` for potentially higher-quality su For LM Studio users, navigate to the "My Models" section, find your desired model, and copy the path (e.g., `Qwen/Qwen2.5-Coder-1.5B-Instruct-GGUF/qwen2.5-coder-1.5b-instruct-q4_k_m.gguf`). Use this path as the `model` value in your configuration. ::: + ### Using a remote instance When using a remote instance you need to set the `"apiBase"` value in the configuration: -```json title="config.json"" +```json title="config.json (Deprecated)"" { "tabAutocompleteModel": { "title": "Qwen2.5-Coder 1.5B", @@ -63,6 +64,7 @@ When using a remote instance you need to set the `"apiBase"` value in the config } } ``` + ## Other experiences There are many more models and providers you can use with Autocomplete. Check them out [here](../customize/model-types/autocomplete.md). You can also see more examples of Autocomplete configuration [here](../customize/deep-dives/autocomplete.md) diff --git a/docs/docs/chat/model-setup.mdx b/docs/docs/chat/model-setup.mdx index eb7dc5430..b055adf24 100644 --- a/docs/docs/chat/model-setup.mdx +++ b/docs/docs/chat/model-setup.mdx @@ -20,7 +20,7 @@ For the best overall Chat experience, you will want to use a 400B+ parameter mod Our current top recommendation is Claude Sonnet 3.5 from [Anthropic](../customize/model-providers/top-level/anthropic.md). -```json title="config.json" +```json title="config.json (Deprecated)" "models": [ { "title": "Claude 3.5 Sonnet", @@ -37,7 +37,7 @@ If you prefer to use an open-weight model, then Llama 3.1 405B from Meta is your - ```json title="config.json" + ```json title="config.json (Deprecated)" "models": [ { "title": "Llama 3.1 405B", @@ -49,7 +49,7 @@ If you prefer to use an open-weight model, then Llama 3.1 405B from Meta is your ``` - ```json title="config.json" + ```json title="config.json (Deprecated)" "models": [ { "title": "Llama 3.1 405B", @@ -61,7 +61,7 @@ If you prefer to use an open-weight model, then Llama 3.1 405B from Meta is your ``` - ```json title="config.json" + ```json title="config.json (Deprecated)" "models": [ { "title": "Llama 3.1 405B", @@ -72,7 +72,7 @@ If you prefer to use an open-weight model, then Llama 3.1 405B from Meta is your ``` - ```json title="config.json" + ```json title="config.json (Deprecated)" "models": [ { "title": "Llama 3.1 405B", @@ -88,7 +88,7 @@ If you prefer to use an open-weight model, then Llama 3.1 405B from Meta is your If you prefer to use a model from [OpenAI](../customize/model-providers/top-level/openai.md), then we recommend GPT-4o. -```json title="config.json" +```json title="config.json (Deprecated)" "models": [ { "title": "GPT-4o", @@ -103,7 +103,7 @@ If you prefer to use a model from [OpenAI](../customize/model-providers/top-leve If you prefer to use a model from [Google](../customize/model-providers/top-level/gemini.md), then we recommend Gemini 1.5 Pro. -```json title="config.json" +```json title="config.json (Deprecated)" "models": [ { "title": "Gemini 1.5 Pro", @@ -124,7 +124,7 @@ If your local machine can run an 8B parameter model, then we recommend running L - ```json title="config.json" + ```json title="config.json (Deprecated)" "models": [ { "title": "Llama 3.1 8B", @@ -135,7 +135,7 @@ If your local machine can run an 8B parameter model, then we recommend running L ``` - ```json title="config.json" + ```json title="config.json (Deprecated)" "models": [ { "title": "Llama 3.1 8B", @@ -153,7 +153,7 @@ If your local machine can run a 16B parameter model, then we recommend running D - ```json title="config.json" + ```json title="config.json (Deprecated)" "models": [ { "title": "DeepSeek Coder 2 16B", @@ -166,7 +166,7 @@ If your local machine can run a 16B parameter model, then we recommend running D - ```json title="config.json" + ```json title="config.json (Deprecated)" "models": [ { "title": "DeepSeek Coder 2 16B", diff --git a/docs/docs/customize/context-providers.md b/docs/docs/customize/context-providers.md index 2ab18613a..daf8b2d83 100644 --- a/docs/docs/customize/context-providers.md +++ b/docs/docs/customize/context-providers.md @@ -18,7 +18,7 @@ To use any of the built-in context providers, open `config.json` and add it to t Reference any file in your current workspace. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -32,7 +32,7 @@ Reference any file in your current workspace. Reference specific functions or classes from throughout your project. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -46,7 +46,7 @@ Reference specific functions or classes from throughout your project. Reference all of the changes you've made to your current branch. This is useful if you want to summarize what you've done or ask for a general review of your work before committing. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -60,7 +60,7 @@ Reference all of the changes you've made to your current branch. This is useful Reference the currently open file. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -74,7 +74,7 @@ Reference the currently open file. Reference the last command you ran in your IDE's terminal and its output. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -88,7 +88,7 @@ Reference the last command you ran in your IDE's terminal and its output. Reference the contents from any documentation site. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -106,7 +106,7 @@ To use it, you need to add a documentation site to your `config.json`. See the [ Reference the contents of all of your open files. Set `onlyPinned` to `true` to only reference pinned files. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -125,7 +125,7 @@ Reference relevant pages from across the web, automatically determined from your Optionally, set "n" to limit the number of results returned (default 6). -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -142,7 +142,7 @@ Optionally, set "n" to limit the number of results returned (default 6). Reference the most relevant snippets from your codebase. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -158,7 +158,7 @@ Read more about indexing and retrieval [here](../customize/deep-dives/codebase.m Uses the same retrieval mechanism as `@Codebase`, but only on a single folder. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -172,7 +172,7 @@ Uses the same retrieval mechanism as `@Codebase`, but only on a single folder. Reference the results of codebase search, just like the results you would get from VS Code search. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -188,7 +188,7 @@ This context provider is powered by [ripgrep](https://github.com/BurntSushi/ripg Reference the markdown converted contents of a given URL. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -202,7 +202,7 @@ Reference the markdown converted contents of a given URL. Reference recent clipboard items -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -216,7 +216,7 @@ Reference recent clipboard items Reference the structure of your current workspace. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -230,7 +230,7 @@ Reference the structure of your current workspace. Get Problems from the current file. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -244,7 +244,7 @@ Get Problems from the current file. Reference the contents of the local variables in the debugger. Currently only available in VS Code. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -265,7 +265,7 @@ Reference the outline of your codebase. By default, signatures are included alon `includeSignatures` params can be set to false to exclude signatures. This could be necessary for large codebases and/or to reduce context size significantly. Signatures will not be included if indexing is disabled. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -288,7 +288,7 @@ This context provider is inpsired by [Aider's repository map](https://aider.chat Reference the architecture and platform of your current operating system. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -302,7 +302,7 @@ Reference the architecture and platform of your current operating system. The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a standard proposed by Anthropic to unify prompts, context, and tool use. Continue supports any MCP server with the MCP context provider. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then configure your `config.json` like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "experimental": { "modelContextProtocolServers": [ @@ -328,7 +328,7 @@ See [Prompt Files](/customize/deep-dives/prompt-files). Prompt files are not add Reference the conversation in a GitHub issue. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -353,7 +353,7 @@ Make sure to include your own [GitHub personal access token](https://docs.github Reference table schemas from Sqlite, Postgres, MSSQL, and MySQL databases. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -407,7 +407,7 @@ Available connection types: Reference the schema of a table, and some sample rows -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -436,7 +436,7 @@ By default, the `schema` filter is set to `public`, and the `sampleRows` is set Reference the results of a Google search. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -457,7 +457,7 @@ Note: You can get an API key for free at [serper.dev](https://serper.dev). Reference an open MR for this branch on GitLab. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -476,7 +476,7 @@ You will need to create a [personal access token](https://docs.gitlab.com/ee/use You can specify the domain to communicate with by setting the `domain` parameter in your configurtion. By default this is set to `gitlab.com`. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -498,7 +498,7 @@ If you select some code to be edited, you can have the context provider filter o Reference the conversation in a Jira issue. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -520,7 +520,7 @@ This context provider supports both Jira API version 2 and 3. It will use versio that's what the cloud version uses, but if you have the datacenter version of Jira, you'll need to set the API Version to 2 using the `apiVersion` property. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -547,7 +547,7 @@ You can override this query by setting the `issueQuery` parameter. Reference the messages in a Discord channel. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -577,7 +577,7 @@ Make sure to include your own [Bot Token](https://discord.com/developers/applica The HttpContextProvider makes a POST request to the url passed in the configuration. The server must return 200 OK with a ContextItem object or an array of ContextItems. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -622,7 +622,7 @@ The response 200 OK should be a JSON object with the following structure: Reference specific git commit metadata and diff or all of the recent commits. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -643,7 +643,7 @@ The LastXCommitsDepth is how many recent commits will be included, defaults to 1 Reference recent clipboard items -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -657,7 +657,7 @@ Reference recent clipboard items Query a [Greptile](https://www.greptile.com/) index of the current repo/branch. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { diff --git a/docs/docs/customize/deep-dives/autocomplete.md b/docs/docs/customize/deep-dives/autocomplete.md index 3936643e5..43c096669 100644 --- a/docs/docs/customize/deep-dives/autocomplete.md +++ b/docs/docs/customize/deep-dives/autocomplete.md @@ -7,7 +7,7 @@ keywords: [autocomplete] If you want to have the best autocomplete experience, we recommend using Codestral, which is available through the [Mistral API](https://console.mistral.ai/). To do this, obtain an API key and add it to your `config.json`: -```json title="config.json" +```json title="config.json (Deprecated)" { "tabAutocompleteModel": { "title": "Codestral", @@ -32,7 +32,7 @@ Once it has been downloaded, you should begin to see completions in VS Code. All of the configuration options available for chat models are available to use for tab-autocomplete. For example, if you wanted to use a remote Ollama instance you would edit your `config.json` like this (note that it is not inside the models array): -```json title="config.json" +```json title="config.json (Deprecated)" { "tabAutocompleteModel": { "title": "Tab Autocomplete Model", @@ -71,7 +71,7 @@ This object allows you to customize the behavior of tab-autocomplete. The availa ### Full example -```json title="config.json" +```json title="config.json (Deprecated)" { "tabAutocompleteModel": { "title": "Tab Autocomplete Model", diff --git a/docs/docs/customize/deep-dives/codebase.md b/docs/docs/customize/deep-dives/codebase.md index 4da920943..a5a06644f 100644 --- a/docs/docs/customize/deep-dives/codebase.md +++ b/docs/docs/customize/deep-dives/codebase.md @@ -40,7 +40,7 @@ Here are use cases where it is not useful: There are a few options that let you configure the behavior of the codebase context provider. These can be set in `config.json`, and are the same for the codebase, docs, and folder context providers: -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { diff --git a/docs/docs/customize/deep-dives/docs.md b/docs/docs/customize/deep-dives/docs.md index 0d3913ccd..bfc85ed7e 100644 --- a/docs/docs/customize/deep-dives/docs.md +++ b/docs/docs/customize/deep-dives/docs.md @@ -12,7 +12,7 @@ The [`@Docs` context provider](customize/context-providers.md#docs) allows you t To enable the `@Docs` context provider, you need to add it to the list of context providers in your `config.json` file. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -53,7 +53,7 @@ To add multiple documentation sites, we recommend adding them in bulk to your `c The [configuration schema for docs](https://github.com/continuedev/continue/blob/v0.9.212-vscode/extensions/vscode/config_schema.json#L1943-L1973) is as follows: -```json title="config.json" +```json title="config.json (Deprecated)" "docs": [ { "title": "Continue", @@ -73,7 +73,7 @@ The [configuration schema for docs](https://github.com/continuedev/continue/blob As with [@Codebase context provider configuration](https://docs.continue.dev/customize/deep-dives/codebase#configuration), you can adjust the behavior of the docs context provider with the `nRetrieve`, `nFinal`, and `useReranking` -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -94,7 +94,7 @@ By default, we use a lighter weight tool to crawl documentation sites that canno If you want to crawl a site that is dynamically generated, or you get an error while attempting to crawl a site, you can enable the experimental `useChromiumForDocsCrawling` feature in your `config.json`. This will download and install Chromium to `~/.continue/.utils`. -```json title="config.json" +```json title="config.json (Deprecated)" "experimental": { "useChromiumForDocsCrawling": true } diff --git a/docs/docs/customize/model-providers/moonshot.md b/docs/docs/customize/model-providers/moonshot.md index cba20fb82..c182cf4dd 100644 --- a/docs/docs/customize/model-providers/moonshot.md +++ b/docs/docs/customize/model-providers/moonshot.md @@ -9,7 +9,7 @@ To use Moonshot AI models, you need to: 1. Get an API key from [Moonshot AI Platform](https://platform.moonshot.cn/) 2. Add the following configuration to your `config.json`: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -42,7 +42,7 @@ Moonshot AI currently provides the following models: Here's a complete configuration example: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/SambaNova.md b/docs/docs/customize/model-providers/more/SambaNova.md index f35c56dd5..ab1e7238d 100644 --- a/docs/docs/customize/model-providers/more/SambaNova.md +++ b/docs/docs/customize/model-providers/more/SambaNova.md @@ -2,7 +2,7 @@ The SambaNova Cloud is a cloud platform for running large AI models with the world record Llama 3.1 70B/405B performance. You can follow the instructions in [this blog post](https://sambanova.ai/blog/accelerating-coding-with-sambanova-cloud?ref=blog.continue.dev) to configure your setup. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/asksage.md b/docs/docs/customize/model-providers/more/asksage.md index 382f6862f..a4445ba77 100644 --- a/docs/docs/customize/model-providers/more/asksage.md +++ b/docs/docs/customize/model-providers/more/asksage.md @@ -10,7 +10,7 @@ To get an Ask Sage API key login to the Ask Sage platform (If you don't have an To use the Ask Sage models, the following configuration is required to the `config.json` file: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/cerebras.md b/docs/docs/customize/model-providers/more/cerebras.md index d9cbd31dc..1fdc040ed 100644 --- a/docs/docs/customize/model-providers/more/cerebras.md +++ b/docs/docs/customize/model-providers/more/cerebras.md @@ -6,7 +6,7 @@ Cerebras Inference uses specialized silicon to provides fast inference. 2. Create and copy the API key for use in Continue. 3. Update your Continue config file: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/cloudflare.md b/docs/docs/customize/model-providers/more/cloudflare.md index 5281cba79..fb355704b 100644 --- a/docs/docs/customize/model-providers/more/cloudflare.md +++ b/docs/docs/customize/model-providers/more/cloudflare.md @@ -2,7 +2,7 @@ Cloudflare Workers AI can be used for both chat and tab autocompletion in Continue. To setup Cloudflare Workers AI, add the following to your `config.json` file: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/cohere.md b/docs/docs/customize/model-providers/more/cohere.md index 8a1f069a6..4e2309e4f 100644 --- a/docs/docs/customize/model-providers/more/cohere.md +++ b/docs/docs/customize/model-providers/more/cohere.md @@ -6,7 +6,7 @@ Before using Cohere, visit the [Cohere dashboard](https://dashboard.cohere.com/a We recommend configuring **Command-R Plus** as your chat model. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -29,7 +29,7 @@ Cohere currently does not offer any autocomplete models. We recommend configuring **embed-english-v3.0** as your embeddings model. -```json title="config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "provider": "cohere", @@ -43,7 +43,7 @@ We recommend configuring **embed-english-v3.0** as your embeddings model. We recommend configuring **rerank-english-v3.0** as your reranking model. -```json title="config.json" +```json title="config.json (Deprecated)" { "reranker": { "name": "cohere", diff --git a/docs/docs/customize/model-providers/more/deepinfra.md b/docs/docs/customize/model-providers/more/deepinfra.md index f79824cce..0c31466e4 100644 --- a/docs/docs/customize/model-providers/more/deepinfra.md +++ b/docs/docs/customize/model-providers/more/deepinfra.md @@ -2,7 +2,7 @@ [DeepInfra](https://deepinfra.com) provides inference for open-source models at very low cost. To get started with DeepInfra, obtain your API key [here](https://deepinfra.com/dash). Then, find the model you want to use [here](https://deepinfra.com/models?type=text-generation) and copy the name of the model. Continue can then be configured to use the `DeepInfra` LLM class, like the example here: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/flowise.md b/docs/docs/customize/model-providers/more/flowise.md index f860d966b..8302f0936 100644 --- a/docs/docs/customize/model-providers/more/flowise.md +++ b/docs/docs/customize/model-providers/more/flowise.md @@ -2,7 +2,7 @@ [Flowise](https://flowiseai.com/) is a low-code/no-code drag & drop tool with the aim to make it easy for people to visualize and build LLM apps. Continue can then be configured to use the `Flowise` LLM class, like the example here: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/function-network.md b/docs/docs/customize/model-providers/more/function-network.md index c48e899d8..5c9ee3b40 100644 --- a/docs/docs/customize/model-providers/more/function-network.md +++ b/docs/docs/customize/model-providers/more/function-network.md @@ -2,6 +2,7 @@ title: Function Network slug: ../function-network --- + # Function Network > Private, Affordable User-Owned AI @@ -16,7 +17,7 @@ To get an API key, login to the Function Network Developer Platform. If you don' Function Network supports a number of models for chat. We recommend using LLama 3.1 70b or Qwen2.5-Coder-32B-Instruct. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -35,7 +36,7 @@ Function Network supports a number of models for chat. We recommend using LLama Function Network supports a number of models for autocomplete. We recommend using Llama 3.1 8b or Qwen2.5-Coder-1.5B. -```json title="config.json" +```json title="config.json (Deprecated)" { "tabAutocompleteModel": { "title": "Deepseek Coder 6.7b", @@ -50,7 +51,7 @@ Function Network supports a number of models for autocomplete. We recommend usin Function Network supports a number of models for embeddings. We recommend using baai/bge-base-en-v1.5. -```json title="config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "provider": "function-network", diff --git a/docs/docs/customize/model-providers/more/groq.md b/docs/docs/customize/model-providers/more/groq.md index 54e678abc..ab8a7e278 100644 --- a/docs/docs/customize/model-providers/more/groq.md +++ b/docs/docs/customize/model-providers/more/groq.md @@ -5,7 +5,7 @@ Groq provides the fastest available inference for open-source language models, i 1. Obtain an API key [here](https://console.groq.com/keys) 2. Update your Continue config file like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.md b/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.md index a2122fc4d..76f0d6f3b 100644 --- a/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.md +++ b/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.md @@ -2,7 +2,7 @@ Hugging Face Inference Endpoints are an easy way to setup instances of open-source language models on any cloud. Sign up for an account and add billing [here](https://huggingface.co/settings/billing), access the Inference Endpoints [here](https://ui.endpoints.huggingface.co), click on “New endpoint”, and fill out the form (e.g. select a model like [WizardCoder-Python-34B-V1.0](https://huggingface.co/WizardLM/WizardCoder-Python-34B-V1.0)), and then deploy your model by clicking “Create Endpoint”. Change `~/.continue/config.json` to look like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/ipex_llm.md b/docs/docs/customize/model-providers/more/ipex_llm.md index 47bb18b2a..60c3a792a 100644 --- a/docs/docs/customize/model-providers/more/ipex_llm.md +++ b/docs/docs/customize/model-providers/more/ipex_llm.md @@ -6,7 +6,7 @@ IPEX-LLM supports accelerated Ollama backend to be hosted on Intel GPU. Refer to [this guide](https://ipex-llm.readthedocs.io/en/latest/doc/LLM/Quickstart/ollama_quickstart.html) from IPEX-LLM official documentation about how to install and run Ollama serve accelerated by IPEX-LLM on Intel GPU. You can then configure Continue to use the IPEX-LLM accelerated `"ollama"` provider as follows: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -20,7 +20,7 @@ IPEX-LLM supports accelerated Ollama backend to be hosted on Intel GPU. Refer to If you would like to reach the Ollama service from another machine, make sure you set or export the environment variable `OLLAMA_HOST=0.0.0.0` before executing the command `ollama serve`. Then, in the Continue configuration, set `'apiBase'` to correspond with the IP address / port of the remote machine. That is, Continue can be configured to be: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/kindo.md b/docs/docs/customize/model-providers/more/kindo.md index 9e205c66e..a324cf2f0 100644 --- a/docs/docs/customize/model-providers/more/kindo.md +++ b/docs/docs/customize/model-providers/more/kindo.md @@ -4,7 +4,7 @@ Kindo offers centralized control over your organization's AI operations, ensurin ## Config Example -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -19,7 +19,7 @@ Kindo offers centralized control over your organization's AI operations, ensurin ## Tab Autocomplete Config Example -```json title="config.json" +```json title="config.json (Deprecated)" { "tabAutocompleteModel": [ { diff --git a/docs/docs/customize/model-providers/more/llamacpp.md b/docs/docs/customize/model-providers/more/llamacpp.md index 8cb367e3f..e1534c651 100644 --- a/docs/docs/customize/model-providers/more/llamacpp.md +++ b/docs/docs/customize/model-providers/more/llamacpp.md @@ -8,7 +8,7 @@ Run the llama.cpp server binary to start the API server. If running on a remote After it's up and running, change `~/.continue/config.json` to look like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/llamafile.md b/docs/docs/customize/model-providers/more/llamafile.md index 71f4f7f07..b11870624 100644 --- a/docs/docs/customize/model-providers/more/llamafile.md +++ b/docs/docs/customize/model-providers/more/llamafile.md @@ -2,7 +2,7 @@ A [llamafile](https://github.com/Mozilla-Ocho/llamafile#readme) is a self-contained binary that can run an open-source LLM. You can configure this provider in your config.json as follows: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/lmstudio.md b/docs/docs/customize/model-providers/more/lmstudio.md index a901f811a..19114c217 100644 --- a/docs/docs/customize/model-providers/more/lmstudio.md +++ b/docs/docs/customize/model-providers/more/lmstudio.md @@ -2,7 +2,7 @@ [LM Studio](https://lmstudio.ai) is an application for Mac, Windows, and Linux that makes it easy to locally run open-source models and comes with a great UI. To get started with LM Studio, download from the website, use the UI to download a model, and then start the local inference server. Continue can then be configured to use the `LMStudio` LLM class: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -18,7 +18,7 @@ LMStudio supports embeddings endpoints, and comes with the `nomic-ai/nomic-embed-text-v1.5-GGUF` model (as of Nov 2024, check your models) -```json title="config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "provider": "lmstudio", @@ -31,7 +31,7 @@ LMStudio supports embeddings endpoints, and comes with the `nomic-ai/nomic-embed To configure a remote instance of LM Studio, add the `"apiBase"` property to your model in config.json: -```json title="config.json" +```json title="config.json (Deprecated)" { "title": "LM Studio", "model": "codestral", diff --git a/docs/docs/customize/model-providers/more/msty.md b/docs/docs/customize/model-providers/more/msty.md index 1fda1d88b..ce930ace3 100644 --- a/docs/docs/customize/model-providers/more/msty.md +++ b/docs/docs/customize/model-providers/more/msty.md @@ -2,7 +2,7 @@ [Msty](https://msty.app/) is an application for Windows, Mac, and Linux that makes it really easy to run online as well as local open-source models, including Llama-2, DeepSeek Coder, etc. No need to fidget with your terminal, run a command, or anything. Just download the app from the website, click a button, and you are up and running. Continue can then be configured to use the `Msty` LLM class: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -30,7 +30,7 @@ In addition to the model type, you can also configure some of the parameters tha If you need to send custom headers for authentication, you may use the `requestOptions.headers` property like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/nebius.md b/docs/docs/customize/model-providers/more/nebius.md index d4cfa344b..92bc6a997 100644 --- a/docs/docs/customize/model-providers/more/nebius.md +++ b/docs/docs/customize/model-providers/more/nebius.md @@ -8,7 +8,7 @@ Available models can be found on the [Nebius AI Studio models page](https://stud ## Chat model -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -25,7 +25,7 @@ Available models can be found on the [Nebius AI Studio models page](https://stud Available models can be found on the [Nebius AI Studio embeddings page](https://studio.nebius.ai/models/embedding) -```json title="config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "provider": "nebius", diff --git a/docs/docs/customize/model-providers/more/novita.md b/docs/docs/customize/model-providers/more/novita.md index 02f7cefb5..5b829bf91 100644 --- a/docs/docs/customize/model-providers/more/novita.md +++ b/docs/docs/customize/model-providers/more/novita.md @@ -2,7 +2,7 @@ [Novita AI](https://novita.ai?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link) offers an affordable, reliable, and simple inference platform with scalable [LLM API](https://novita.ai/docs/model-api/reference/introduction.html), empowering developers to build AI applications. Try the [Novita AI Llama 3 API Demo](https://novita.ai/model-api/product/llm-api/playground/meta-llama-llama-3.1-70b-instruct?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link) today!. You can sign up [here](https://novita.ai/user/login?&redirect=/&utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link), copy your API key on the [Key Management](https://novita.ai/settings/key-management?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link), and then hit the play button on any model from the [Novita AI Models list](https://novita.ai/llm-api?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link). Change `~/.continue/config.json` to look like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/nvidia.md b/docs/docs/customize/model-providers/more/nvidia.md index 049ff7754..89e2136e8 100644 --- a/docs/docs/customize/model-providers/more/nvidia.md +++ b/docs/docs/customize/model-providers/more/nvidia.md @@ -12,7 +12,7 @@ title: NVIDIA We recommend configuring **Nemotron-4-340B-Instruct** as your chat model. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -35,7 +35,7 @@ NVIDIA currently does not offer any autocomplete models. We recommend configuring **NVIDIA Retrieval QA Mistral 7B** as your embeddings model. -```json title="config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "provider": "nvidia", diff --git a/docs/docs/customize/model-providers/more/openrouter.md b/docs/docs/customize/model-providers/more/openrouter.md index d08f754f5..bfd86ec69 100644 --- a/docs/docs/customize/model-providers/more/openrouter.md +++ b/docs/docs/customize/model-providers/more/openrouter.md @@ -4,7 +4,7 @@ OpenRouter is a unified interface for commercial and open-source models, giving Change `~/.continue/config.json` to look like the following. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -22,7 +22,7 @@ To utilize features such as provider preferences or model routing configuration, For example, to prevent extra long prompts from being compressed, you can explicitly turn off the feature like so: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/replicatellm.md b/docs/docs/customize/model-providers/more/replicatellm.md index 065825729..34c72e010 100644 --- a/docs/docs/customize/model-providers/more/replicatellm.md +++ b/docs/docs/customize/model-providers/more/replicatellm.md @@ -2,7 +2,7 @@ Replicate is a great option for newly released language models or models that you've deployed through their platform. Sign up for an account [here](https://replicate.ai/), copy your API key, and then select any model from the [Replicate Streaming List](https://replicate.com/collections/streaming-language-models). Change `~/.continue/config.json` to look like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/sagemaker.md b/docs/docs/customize/model-providers/more/sagemaker.md index 0c9eba812..a7b82c353 100644 --- a/docs/docs/customize/model-providers/more/sagemaker.md +++ b/docs/docs/customize/model-providers/more/sagemaker.md @@ -4,7 +4,7 @@ SageMaker can be used for both chat and embedding models. Chat models are suppor To setup SageMaker as a chat model provider, add the following to your `config.json` file: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -17,7 +17,7 @@ To setup SageMaker as a chat model provider, add the following to your `config.j "embeddingsProvider": { "provider": "sagemaker", "model": "mxbai-embed-large-v1-endpoint" - }, + } } ``` diff --git a/docs/docs/customize/model-providers/more/scaleway.md b/docs/docs/customize/model-providers/more/scaleway.md index 411e95f3a..dce234f49 100644 --- a/docs/docs/customize/model-providers/more/scaleway.md +++ b/docs/docs/customize/model-providers/more/scaleway.md @@ -15,7 +15,7 @@ Read the [quickstart documentation here](https://www.scaleway.com/en/docs/ai-dat We recommend configuring **Qwen2.5-Coder-32B-Instruct** as your chat model. [Click here](https://www.scaleway.com/en/docs/ai-data/generative-apis/reference-content/supported-models/) to see the list of available chat models. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -38,7 +38,7 @@ Scaleway currently does not offer any autocomplete models. We recommend configuring **BGE-Multilingual-Gemma2** as your embeddings model. -```json title="config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "provider": "scaleway", @@ -46,4 +46,4 @@ We recommend configuring **BGE-Multilingual-Gemma2** as your embeddings model. "apiKey": "[API_KEY]" } } -``` \ No newline at end of file +``` diff --git a/docs/docs/customize/model-providers/more/siliconflow.md b/docs/docs/customize/model-providers/more/siliconflow.md index c27fbbdaf..96c7a90df 100644 --- a/docs/docs/customize/model-providers/more/siliconflow.md +++ b/docs/docs/customize/model-providers/more/siliconflow.md @@ -12,7 +12,7 @@ You can get an API key from the [Silicon Cloud](https://cloud.siliconflow.cn/acc We recommend configuring **Qwen/Qwen2.5-Coder-32B-Instruct** as your chat model. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -29,7 +29,7 @@ We recommend configuring **Qwen/Qwen2.5-Coder-32B-Instruct** as your chat model. We recommend configuring **Qwen/Qwen2.5-Coder-7B-Instruct** as your autocomplete model. -```json title="config.json" +```json title="config.json (Deprecated)" { "tabAutocompleteModel": { "title": "Qwen", diff --git a/docs/docs/customize/model-providers/more/textgenwebui.md b/docs/docs/customize/model-providers/more/textgenwebui.md index 723079735..66ea07268 100644 --- a/docs/docs/customize/model-providers/more/textgenwebui.md +++ b/docs/docs/customize/model-providers/more/textgenwebui.md @@ -2,7 +2,7 @@ TextGenWebUI is a comprehensive, open-source language model UI and local server. You can set it up with an OpenAI-compatible server plugin, and then configure it in your `config.json` like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/together.md b/docs/docs/customize/model-providers/more/together.md index e5ed9abd0..9025c50b1 100644 --- a/docs/docs/customize/model-providers/more/together.md +++ b/docs/docs/customize/model-providers/more/together.md @@ -2,7 +2,7 @@ The Together API is a cloud platform for running large AI models. You can sign up [here](https://api.together.xyz/signup), copy your API key on the initial welcome screen, and then hit the play button on any model from the [Together Models list](https://docs.together.ai/docs/serverless-models). Change `~/.continue/config.json` to look like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/vllm.md b/docs/docs/customize/model-providers/more/vllm.md index 594f0b428..45daa168e 100644 --- a/docs/docs/customize/model-providers/more/vllm.md +++ b/docs/docs/customize/model-providers/more/vllm.md @@ -10,7 +10,7 @@ vllm serve meta-llama/Meta-Llama-3.1-8B-Instruct We recommend configuring **Llama3.1 8B** as your chat model. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -27,7 +27,7 @@ We recommend configuring **Llama3.1 8B** as your chat model. We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model. -```json title="config.json" +```json title="config.json (Deprecated)" { "tabAutocompleteModel": { "title": "Qwen2.5-Coder 1.5B", @@ -42,7 +42,7 @@ We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model. We recommend configuring **Nomic Embed Text** as your embeddings model. -```json title="config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "provider": "vllm", diff --git a/docs/docs/customize/model-providers/top-level/anthropic.md b/docs/docs/customize/model-providers/top-level/anthropic.md index 963734fd4..a7fa42888 100644 --- a/docs/docs/customize/model-providers/top-level/anthropic.md +++ b/docs/docs/customize/model-providers/top-level/anthropic.md @@ -13,7 +13,7 @@ You can get an API key from the [Anthropic console](https://console.anthropic.co We recommend configuring **Claude 3.5 Sonnet** as your chat model. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -50,7 +50,7 @@ Anthropic supports [prompt caching with Claude](https://docs.anthropic.com/en/do To enable caching of the system message and the turn-by-turn conversation, update your your model configuration as following: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/top-level/azure.md b/docs/docs/customize/model-providers/top-level/azure.md index ccf8b814e..02cfcdd0d 100644 --- a/docs/docs/customize/model-providers/top-level/azure.md +++ b/docs/docs/customize/model-providers/top-level/azure.md @@ -15,7 +15,7 @@ For details on OpenAI model setup, see [Azure OpenAI Service configuration](#gen We recommend configuring **GPT-4o** as your chat model. -```json title="config.json" +```json title="config.json (Deprecated)" "models": [{ "title": "GPT-4o", "provider": "azure", @@ -30,7 +30,7 @@ We recommend configuring **GPT-4o** as your chat model. We recommend configuring **Codestral** as your autocomplete model. -```json title="config.json" +```json title="config.json (Deprecated)" { "tabAutocompleteModel": { "title": "Codestral", @@ -44,7 +44,7 @@ We recommend configuring **Codestral** as your autocomplete model. We recommend configuring **text-embedding-3-large** as your embeddings model. -```json title="config.json" +```json title="config.json (Deprecated)" "embeddingsProvider": { "provider": "openai", "model": "text-embedding-3-large", @@ -79,7 +79,7 @@ To find this information in _Azure AI Foundry_, first select the model that you For example, a Target URI of `https://just-an-example.openai.azure.com/openai/deployments/gpt-4o-july/chat/completions?api-version=2023-03-15-preview` would map to the following: -```json title="config.json" +```json title="config.json (Deprecated)" { "title": "GPT-4o Azure", "model": "gpt-4o", diff --git a/docs/docs/customize/model-providers/top-level/bedrock.md b/docs/docs/customize/model-providers/top-level/bedrock.md index 67d919a2f..53ae537bf 100644 --- a/docs/docs/customize/model-providers/top-level/bedrock.md +++ b/docs/docs/customize/model-providers/top-level/bedrock.md @@ -9,7 +9,7 @@ Amazon Bedrock is a fully managed service on AWS that provides access to foundat We recommend configuring **Claude 3.5 Sonnet** as your chat model. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -22,10 +22,12 @@ We recommend configuring **Claude 3.5 Sonnet** as your chat model. ] } ``` + > If you run into the following error when connecting to the new Claude 3.5 Sonnet 2 models from AWS - `400 Invocation of model ID anthropic.claude-3-5-sonnet-20241022-v2:0 with on-demand throughput isn’t supported. Retry your request with the ID or ARN of an inference profile that contains this model.` > You can fix this using the following config.json -```json title="config.json" + +```json title="config.json (Deprecated)" { "models": [ { @@ -49,7 +51,7 @@ Bedrock currently does not offer any autocomplete models. We recommend configuring [`amazon.titan-embed-text-v2:0`](https://docs.aws.amazon.com/bedrock/latest/devguide/models.html#amazon.titan-embed-text-v2-0) as your embeddings model. -```json title="~/.continue/config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "title": "Embeddings Model", @@ -64,7 +66,7 @@ We recommend configuring [`amazon.titan-embed-text-v2:0`](https://docs.aws.amazo We recommend configuring `cohere.rerank-v3-5:0` as your reranking model, you may also use `amazon.rerank-v1:0`. -```json title="~/.continue/config.json" +```json title="config.json (Deprecated)" { "reranker": { "name": "bedrock", @@ -92,7 +94,7 @@ aws_session_token = pqrstuvwxyz # Optional: means short term creds. To setup Bedrock using custom imported models, add the following to your `config.json` file: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/top-level/deepseek.md b/docs/docs/customize/model-providers/top-level/deepseek.md index 1ea875785..6698ebbb5 100644 --- a/docs/docs/customize/model-providers/top-level/deepseek.md +++ b/docs/docs/customize/model-providers/top-level/deepseek.md @@ -13,7 +13,7 @@ You can get an API key from the [DeepSeek console](https://www.deepseek.com/). We recommend configuring **DeepSeek Chat** as your chat model. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -30,7 +30,7 @@ We recommend configuring **DeepSeek Chat** as your chat model. We recommend configuring **DeepSeek Coder** as your autocomplete model. -```json title="config.json" +```json title="config.json (Deprecated)" { "tabAutocompleteModel": { "title": "DeepSeek Coder", diff --git a/docs/docs/customize/model-providers/top-level/gemini.md b/docs/docs/customize/model-providers/top-level/gemini.md index eff3e91ac..9b6247484 100644 --- a/docs/docs/customize/model-providers/top-level/gemini.md +++ b/docs/docs/customize/model-providers/top-level/gemini.md @@ -13,7 +13,7 @@ You can get an API key from the [Google AI Studio](https://aistudio.google.com/) We recommend configuring **Gemini 1.5 Pro** as your chat model. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -36,7 +36,7 @@ Gemini currently does not offer any autocomplete models. We recommend configuring **text-embedding-004** as your embeddings model. -```json title="config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "provider": "gemini", diff --git a/docs/docs/customize/model-providers/top-level/mistral.md b/docs/docs/customize/model-providers/top-level/mistral.md index 2c1eb81e1..67ba28b3e 100644 --- a/docs/docs/customize/model-providers/top-level/mistral.md +++ b/docs/docs/customize/model-providers/top-level/mistral.md @@ -13,7 +13,7 @@ You can get an API key from the [Mistral Dashboard](https://console.mistral.ai). We recommend configuring **Mistral Large** as your chat model. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -30,7 +30,7 @@ We recommend configuring **Mistral Large** as your chat model. We recommend configuring **Codestral** as your autocomplete model. -```json title="config.json" +```json title="config.json (Deprecated)" { "tabAutocompleteModel": { "title": "Codestral", @@ -45,7 +45,7 @@ We recommend configuring **Codestral** as your autocomplete model. We recommend configuring **Mistral Embed** as your embeddings model. -```json title="config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "provider": "mistral", diff --git a/docs/docs/customize/model-providers/top-level/ollama.md b/docs/docs/customize/model-providers/top-level/ollama.md index 611c3dad8..f2229c3b6 100644 --- a/docs/docs/customize/model-providers/top-level/ollama.md +++ b/docs/docs/customize/model-providers/top-level/ollama.md @@ -9,7 +9,7 @@ Ollama is an open-source tool that allows to run large language models (LLMs) lo We recommend configuring **Llama3.1 8B** as your chat model. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -25,7 +25,7 @@ We recommend configuring **Llama3.1 8B** as your chat model. We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model. -```json title="config.json" +```json title="config.json (Deprecated)" { "tabAutocompleteModel": { "title": "Qwen2.5-Coder 1.5B", @@ -39,7 +39,7 @@ We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model. We recommend configuring **Nomic Embed Text** as your embeddings model. -```json title="config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "provider": "ollama", @@ -58,7 +58,7 @@ Ollama currently does not offer any reranking models. To configure a remote instance of Ollama, add the `"apiBase"` property to your model in config.json: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/top-level/openai.md b/docs/docs/customize/model-providers/top-level/openai.md index 40126fb9b..d59fe1f6a 100644 --- a/docs/docs/customize/model-providers/top-level/openai.md +++ b/docs/docs/customize/model-providers/top-level/openai.md @@ -13,7 +13,7 @@ You can get an API key from the [OpenAI console](https://platform.openai.com/acc We recommend configuring **GPT-4o** as your chat model. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -36,7 +36,7 @@ OpenAI currently does not offer any autocomplete models. We recommend configuring **text-embedding-3-large** as your embeddings model. -```json title="config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "provider": "openai", @@ -72,7 +72,7 @@ OpenAI compatible APIs If you are using an OpenAI compatible server / API, you can change the `apiBase` like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -88,7 +88,7 @@ If you are using an OpenAI compatible server / API, you can change the `apiBase` To force usage of `chat/completions` instead of `completions` endpoint you can set: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/top-level/vertexai.md b/docs/docs/customize/model-providers/top-level/vertexai.md index 50958cae0..a02609f35 100644 --- a/docs/docs/customize/model-providers/top-level/vertexai.md +++ b/docs/docs/customize/model-providers/top-level/vertexai.md @@ -13,7 +13,7 @@ You need to enable the [Vertex AI API](https://console.cloud.google.com/marketpl We recommend configuring **Claude 3.5 Sonnet** as your chat model. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -31,7 +31,7 @@ We recommend configuring **Claude 3.5 Sonnet** as your chat model. We recommend configuring **Codestral** or **code-gecko** as your autocomplete model. -```json title="config.json" +```json title="config.json (Deprecated)" { "tabAutocompleteModel": { "title": "Codestral (Vertex AI)", @@ -47,7 +47,7 @@ We recommend configuring **Codestral** or **code-gecko** as your autocomplete mo We recommend configuring **text-embedding-004** as your embeddings model. -```json title="config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "provider": "vertexai", diff --git a/docs/docs/customize/model-providers/top-level/xAI.md b/docs/docs/customize/model-providers/top-level/xAI.md index 9bf23be83..c9317758b 100644 --- a/docs/docs/customize/model-providers/top-level/xAI.md +++ b/docs/docs/customize/model-providers/top-level/xAI.md @@ -13,7 +13,7 @@ You can get an API key from the [xAI console](https://console.x.ai/) We recommend configuring **grok-beta** as your chat model. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-types/embeddings.md b/docs/docs/customize/model-types/embeddings.md index 137f6c260..66fcf9a20 100644 --- a/docs/docs/customize/model-types/embeddings.md +++ b/docs/docs/customize/model-types/embeddings.md @@ -27,7 +27,7 @@ If you want to generate embeddings locally, we recommend using `nomic-embed-text After obtaining an API key from [here](https://www.voyageai.com/), you can configure like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "provider": "voyage", @@ -45,7 +45,7 @@ See [here](../model-providers/top-level/ollama.md#embeddings-model) for instruct [Transformers.js](https://huggingface.co/docs/transformers.js/index) is a JavaScript port of the popular [Transformers](https://huggingface.co/transformers/) library. It allows embeddings to be calculated entirely locally. The model used is `all-MiniLM-L6-v2`, which is shipped alongside the Continue extension. -```json title="config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "provider": "transformers.js" @@ -57,7 +57,7 @@ See [here](../model-providers/top-level/ollama.md#embeddings-model) for instruct [Hugging Face Text Embeddings Inference](https://huggingface.co/docs/text-embeddings-inference/en/index) enables you to host your own embeddings endpoint. You can configure embeddings to use your endpoint as follows: -```json title="config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "provider": "huggingface-tei", diff --git a/docs/docs/customize/model-types/reranking.md b/docs/docs/customize/model-types/reranking.md index a87918cb2..c66445831 100644 --- a/docs/docs/customize/model-types/reranking.md +++ b/docs/docs/customize/model-types/reranking.md @@ -17,7 +17,7 @@ If you have the ability to use any model, we recommend `rerank-2` by Voyage AI, Voyage AI offers the best reranking model for code with their `rerank-2` model. After obtaining an API key from [here](https://www.voyageai.com/), you can configure like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "reranker": { "name": "voyage", @@ -33,7 +33,7 @@ Voyage AI offers the best reranking model for code with their `rerank-2` model. See Cohere's documentation for rerankers [here](https://docs.cohere.com/docs/rerank-2). -```json title="config.json" +```json title="config.json (Deprecated)" { "reranker": { "name": "cohere", @@ -49,7 +49,7 @@ See Cohere's documentation for rerankers [here](https://docs.cohere.com/docs/rer If you only have access to a single LLM, then you can use it as a reranker. This is discouraged unless truly necessary, because it will be much more expensive and still less accurate than any of the above models trained specifically for the task. Note that this will not work if you are using a local model, for example with Ollama, because too many parallel requests need to be made. -```json title="config.json" +```json title="config.json (Deprecated)" { "reranker": { "name": "llm", @@ -66,7 +66,7 @@ The `"modelTitle"` field must match one of the models in your "models" array in [Hugging Face Text Embeddings Inference](https://huggingface.co/docs/text-embeddings-inference/en/index) enables you to host your own [reranker endpoint](https://huggingface.github.io/text-embeddings-inference/#/Text%20Embeddings%20Inference/rerank). You can configure your reranker as follows: -```json title="config.json" +```json title="config.json (Deprecated)" { "reranker": { "name": "huggingface-tei", @@ -84,7 +84,7 @@ The `"modelTitle"` field must match one of the models in your "models" array in Continue offers a free trial of Voyage AI's reranking model. -```json title="config.json" +```json title="config.json (Deprecated)" { "reranker": { "name": "free-trial" diff --git a/docs/docs/customize/slash-commands.md b/docs/docs/customize/slash-commands.md index f640b715f..5afffdb77 100644 --- a/docs/docs/customize/slash-commands.md +++ b/docs/docs/customize/slash-commands.md @@ -16,7 +16,7 @@ To use any of the built-in slash commands, open `config.json` and add it to the Generate a shareable markdown transcript of your current chat history. -```json title="config.json" +```json title="config.json (Deprecated)" { "slashCommands": [ { @@ -34,7 +34,7 @@ Use the `outputDir` parameter to specify where you want to the markdown file to Generate a shell command from natural language and (only in VS Code) automatically paste it into the terminal. -```json title="config.json" +```json title="config.json (Deprecated)" { "slashCommands": [ { @@ -49,7 +49,7 @@ Generate a shell command from natural language and (only in VS Code) automatical Shows the LLM your current git diff and asks it to generate a commit message. -```json title="config.json" +```json title="config.json (Deprecated)" { "slashCommands": [ { @@ -64,7 +64,7 @@ Shows the LLM your current git diff and asks it to generate a commit message. Write a custom slash command at your own HTTP endpoint. Set 'url' in the params object for the endpoint you have setup. The endpoint should return a sequence of string updates, which will be streamed to the Continue sidebar. See our basic [FastAPI example](https://github.com/continuedev/continue/blob/74002369a5e435735b83278fb965e004ae38a97d/core/context/providers/context_provider_server.py#L34-L45) for reference. -```json title="config.json" +```json title="config.json (Deprecated)" { "slashCommands": [ { @@ -80,7 +80,7 @@ Write a custom slash command at your own HTTP endpoint. Set 'url' in the params Describe the issue you'd like to generate, and Continue will turn into a well-formatted title and body, then give you a link to the draft so you can submit. Make sure to set the URL of the repository you want to generate issues for. -```json title="config.json" +```json title="config.json (Deprecated)" { "slashCommands": [ { @@ -96,7 +96,7 @@ Describe the issue you'd like to generate, and Continue will turn into a well-fo The onboard slash command helps to familiarize yourself with a new project by analyzing the project structure, READMEs, and dependency files. It identifies key folders, explains their purpose, and highlights popular packages used. Additionally, it offers insights into the project's architecture. -```json title="config.json" +```json title="config.json (Deprecated)" { "slashCommands": [ { @@ -111,7 +111,7 @@ The onboard slash command helps to familiarize yourself with a new project by an The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a standard proposed by Anthropic to unify prompts, context, and tool use. Continue supports MCP "prompts" by creating slash commands. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then configure your `config.json` like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "experimental": { "modelContextProtocolServers": [ diff --git a/docs/docs/customize/tools.md b/docs/docs/customize/tools.md index fe461d1bd..9047f50ff 100644 --- a/docs/docs/customize/tools.md +++ b/docs/docs/customize/tools.md @@ -23,7 +23,7 @@ To let you balance speed and safety, each tool can be set to 1 of 3 modes: Currently custom tools can be configured using the [Model Context Protocol](https://modelcontextprotocol.io/introduction), a standard proposed by Anthropic to unify prompts, context, and tool use. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then configure your `config.json` like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "experimental": { "modelContextProtocolServers": [ diff --git a/docs/docs/customize/tutorials/build-your-own-context-provider.md b/docs/docs/customize/tutorials/build-your-own-context-provider.md index fae404cd4..48ec810e9 100644 --- a/docs/docs/customize/tutorials/build-your-own-context-provider.md +++ b/docs/docs/customize/tutorials/build-your-own-context-provider.md @@ -184,7 +184,7 @@ Continue will use [esbuild](https://esbuild.github.io/) to bundle your `config.t If you'd like to write a context provider in a language other than TypeScript, you can use the "http" context provider to call a server that hosts your own code. Add the context provider to `config.json` like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "name": "http", "params": { diff --git a/docs/docs/customize/tutorials/build-your-own-slash-command.md b/docs/docs/customize/tutorials/build-your-own-slash-command.md index dc450cdd4..9c0c6f2d4 100644 --- a/docs/docs/customize/tutorials/build-your-own-slash-command.md +++ b/docs/docs/customize/tutorials/build-your-own-slash-command.md @@ -17,7 +17,7 @@ You can add custom slash commands by adding to the `customCommands` property in Custom commands are great when you are frequently reusing a prompt. For example, if you've crafted a great prompt and frequently ask the LLM to check for mistakes in your code, you could add a command like this: -```json title="config.json" +```json title="config.json (Deprecated)" customCommands=[{ "name": "check", "description": "Check for mistakes in my code", diff --git a/docs/docs/customize/tutorials/custom-code-rag.md b/docs/docs/customize/tutorials/custom-code-rag.md index b6f1cc251..653ada9c4 100644 --- a/docs/docs/customize/tutorials/custom-code-rag.md +++ b/docs/docs/customize/tutorials/custom-code-rag.md @@ -124,7 +124,7 @@ async def create_item(item: ContextProviderInput): After you've set up your server, you can configure Continue to use it by adding the "http" context provider to your `contextProviders` array in `config.json`: -```json title="config.json" +```json title="config.json (Deprecated)" { "name": "http", "params": { diff --git a/docs/docs/customize/tutorials/how-to-self-host-a-model.md b/docs/docs/customize/tutorials/how-to-self-host-a-model.md index 4f97824d1..bd4093402 100644 --- a/docs/docs/customize/tutorials/how-to-self-host-a-model.md +++ b/docs/docs/customize/tutorials/how-to-self-host-a-model.md @@ -20,7 +20,7 @@ However, if neither of these are the case, you will need to wire up a new LLM ob Basic authentication can be done with any provider using the `apiKey` field: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -37,7 +37,7 @@ This translates to the header `"Authorization": "Bearer xxx"`. If you need to send custom headers for authentication, you may use the `requestOptions.headers` property like in this example with Ollama: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -56,7 +56,7 @@ If you need to send custom headers for authentication, you may use the `requestO Similarly if your model requires a Certificate for authentication, you may use the `requestOptions.clientCertificate` property like in the example below: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/tutorials/llama3.1.md b/docs/docs/customize/tutorials/llama3.1.md index e2ac72986..038055265 100644 --- a/docs/docs/customize/tutorials/llama3.1.md +++ b/docs/docs/customize/tutorials/llama3.1.md @@ -18,7 +18,7 @@ Ollama is the fastest way to get up and running with local language models. We r 2. Open a terminal and run `ollama run llama3.1:8b` 3. Change your Continue config file like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -37,7 +37,7 @@ Groq provides the fastest available inference for open-source language models, i 1. Obtain an API key [here](https://console.groq.com/keys) 2. Update your Continue config file like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -58,7 +58,7 @@ Together AI provides fast and reliable inference of open-source models. You'll b 2. Copy your API key that appears on the welcome screen 3. Update your Continue config file like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -78,7 +78,7 @@ Replicate makes it easy to host and run open-source AI with an API. 1. Get your Replicate API key [here](https://replicate.ai/) 2. Change your Continue config file like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -120,7 +120,7 @@ Cerebras Inference uses specialized silicon to provides fast inference for the L 2. Create and copy the API key for use in Continue. 3. Update your Continue config file: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/tutorials/set-up-codestral.md b/docs/docs/customize/tutorials/set-up-codestral.md index c48fea653..426a0037f 100644 --- a/docs/docs/customize/tutorials/set-up-codestral.md +++ b/docs/docs/customize/tutorials/set-up-codestral.md @@ -16,7 +16,7 @@ keywords: [codestral, mistral, model setup] 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" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/edit/how-to-customize.mdx b/docs/docs/edit/how-to-customize.mdx index 25d1680f1..677a38642 100644 --- a/docs/docs/edit/how-to-customize.mdx +++ b/docs/docs/edit/how-to-customize.mdx @@ -23,9 +23,9 @@ You can configure a particular model to be used for Edit: apiKeySecret: ANTHOPIC_API_KEY ``` - + Set the `experimental.modelRoles.inlineEdit` property in `config.json`. - ```json title="config.json" + ```json title="config.json (Deprecated)" { "models": { "name": "Claude 3.5 Sonnet", diff --git a/docs/docs/reference.md b/docs/docs/reference.md index 814f6e4af..e0eca3902 100644 --- a/docs/docs/reference.md +++ b/docs/docs/reference.md @@ -41,7 +41,7 @@ _(AWS Only)_ Example: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -66,7 +66,7 @@ Specifies the model or models for tab autocompletion, defaulting to an Ollama in Example -```json title="config.json" +```json title="config.json (Deprecated)" { "tabAutocompleteModel": { "title": "My Starcoder", @@ -96,7 +96,7 @@ Specifies options for tab autocompletion behavior. Example -```json title="config.json" +```json title="config.json (Deprecated)" { "tabAutocompleteOptions": { "debounceDelay": 500, @@ -127,7 +127,7 @@ Embeddings model settings - the model used for @Codebase and @docs. Example: -```json title="config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "provider": "openai", @@ -160,7 +160,7 @@ Parameters that control the behavior of text generation and completion settings. Example -```json title="config.json" +```json title="config.json (Deprecated)" { "completionOptions": { "stream": false, @@ -190,7 +190,7 @@ Default HTTP request options that apply to all models and context providers, unl Example -```json title="config.json" +```json title="config.json (Deprecated)" { "requestOptions": { "headers": { @@ -214,7 +214,7 @@ Configuration for the reranker model used in response ranking. Example -```json title="config.json" +```json title="config.json (Deprecated)" { "reranker": { "name": "voyage", @@ -240,7 +240,7 @@ List of documentation sites to index. Example -```json title="config.json" +```json title="config.json (Deprecated)" "docs": [ { "title": "Continue", @@ -264,7 +264,7 @@ Custom commands initiated by typing "/" in the sidebar. Commands include predefi Example: -```json title="config.json" +```json title="config.json (Deprecated)" { "slashCommands": [ { @@ -295,7 +295,7 @@ User-defined commands for prompt shortcuts in the sidebar, allowing quick access Example: -```json title="config.json" +```json title="config.json (Deprecated)" { "customCommands": [ { @@ -318,7 +318,7 @@ List of the pre-defined context providers that will show up as options while typ Example -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -359,7 +359,7 @@ Customizable UI settings to control interface appearance and behavior. Example: -```json title="config.json" +```json title="config.json (Deprecated)" { "ui": { "codeBlockToolbarPosition": "bottom", @@ -414,7 +414,7 @@ Several experimental config parameters are available, as described below: Example -```json title="config.json" +```json title="config.json (Deprecated)" { "experimental": { "modelRoles": { diff --git a/docs/docs/telemetry.md b/docs/docs/telemetry.md index 8e7152d01..d4fc97840 100644 --- a/docs/docs/telemetry.md +++ b/docs/docs/telemetry.md @@ -28,7 +28,7 @@ The following usage information is collected and reported: You can disable anonymous telemetry by modifying the `config.json` file located in the `~/.continue` directory. This file typically includes the following entry: -```json title="config.json" +```json title="config.json (Deprecated)" { "allowAnonymousTelemetry": true } diff --git a/docs/docs/troubleshooting.md b/docs/docs/troubleshooting.md index a8632457e..f6aaffb38 100644 --- a/docs/docs/troubleshooting.md +++ b/docs/docs/troubleshooting.md @@ -85,7 +85,7 @@ If your keyboard shortcuts are not resolving, you may have other commands that a If you're seeing a `fetch failed` error and your network requires custom certificates, you will need to configure them in `config.json`. In each of the objects in the `"models"` array, add `requestOptions.caBundlePath` like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/yaml-migration.md b/docs/docs/yaml-migration.md index ad62efaa7..a27e5d20d 100644 --- a/docs/docs/yaml-migration.md +++ b/docs/docs/yaml-migration.md @@ -46,7 +46,7 @@ Model-level `completionOptions` are replaced by `defaultCompletionOptions`, with **Before** -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -156,7 +156,7 @@ The JSON `contextProviders` field is replaced by the YAML `context` array. **Before** -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -197,7 +197,7 @@ The `systemMessage` property has been replaced with a `rules` property that take **Before** -```json title="config.json" +```json title="config.json (Deprecated)" { "systemMessage": "Always give concise responses" } @@ -216,7 +216,7 @@ Rather than with `customCommands`, you can now use the `prompts` field to define **Before** -```json title="config.json" +```json title="config.json (Deprecated)" { "customCommands": [ { @@ -251,7 +251,7 @@ Documentation is largely the same, but the `title` property has been replaced wi **Before** -```json title="config.json" +```json title="config.json (Deprecated)" { "docs": [ { @@ -290,7 +290,7 @@ docs: **Before** -```json title="config.json" +```json title="config.json (Deprecated)" { "experimental": { "modelContextProtocolServers": [ From 29719edf6fe916cc91e7fd92afa0fdc737a973cc Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Thu, 16 Jan 2025 23:45:40 -0800 Subject: [PATCH 006/316] remove duplicate autocomplete readme, update github issue template --- .github/ISSUE_TEMPLATE/bug_report.yml | 7 +- core/autocomplete/README.md | 158 -------------------------- 2 files changed, 4 insertions(+), 161 deletions(-) delete mode 100644 core/autocomplete/README.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 93c04fe38..c6e087b38 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -27,14 +27,15 @@ body: - **Continue version**: v0.9.4 - **IDE version**: VSCode 1.85.1 - Model: Claude Sonnet 3.5 - - config.json: `{ "models": ... }` + - config.yaml: `models: ...` + - OR config.json: `{ "models": ... }` value: | - OS: - Continue version: - IDE version: - Model: - - config.json: - ```json + - config: + ```yaml ``` render: Markdown diff --git a/core/autocomplete/README.md b/core/autocomplete/README.md deleted file mode 100644 index ab6e9adfb..000000000 --- a/core/autocomplete/README.md +++ /dev/null @@ -1,158 +0,0 @@ -# Tab Autocomplete (beta) - -Continue now provides support for tab autocomplete in [VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) and [JetBrains IDEs](https://plugins.jetbrains.com/plugin/22707-continue/edit). We will be greatly improving the experience over the next few releases, and it is always helpful to hear feedback. If you have any problems or suggestions, please let us know in our [Discord](https://discord.gg/vapESyrFmJ). - -## Setting up with Ollama (default) - -We recommend setting up tab-autocomplete with a local Ollama instance. To do this, first download the latest version of Ollama from [here](https://ollama.ai). Then, run the following command to download our recommended model: - -```bash -ollama run qwen2.5-coder:1.5b-base -``` - -Once it has been downloaded, you should begin to see completions in VS Code. - -## Setting up with LM Studio - -You can also set up tab-autocomplete with a local LM Studio instance by following these steps: - -1. Download the latest version of LM Studio from [here](https://lmstudio.ai/) -2. Download a model (e.g. search for `Qwen/Qwen2.5-Coder-1.5B-Instruct-GGUF` and choose one of the options there) -3. Go to the server section (button is on the left), select your model from the dropdown at the top, and click "Start Server" -4. Go to the "My Models" section (button is on the left), find your selected model, and copy the name the path (example: `Qwen/Qwen2.5-Coder-1.5B-Instruct-GGUF/qwen2.5-coder-1.5b-instruct-q4_k_m.gguf`); this will be used as the "model" attribute in Continue -5. Go to Continue and modify the configurations for a [custom model](#setting-up-a-custom-model) -6. Set the "provider" to `lmstudio` and the "model" to the path copied earlier - -Example: - -```json title="config.json" -{ - "tabAutocompleteModel": { - "title": "Qwen2.5-Coder 1.5b", - "model": "Qwen/Qwen2.5-Coder-1.5B-Instruct-GGUF", - "provider": "lmstudio" - } -} -``` - -## Setting up a custom model - -All of the configuration options available for chat models are available to use for tab-autocomplete. For example, if you wanted to use a remote vLLM instance you would edit your `config.json` like this (note that it is not inside the models array), filling in the correct model name and vLLM endpoint: - -```json title="config.json" -{ - "tabAutocompleteModel": { - "title": "Tab Autocomplete Model", - "provider": "openai", - "model": "", - "apiBase": "" - }, - ... -} -``` - -As another example, say you want to use a different model, `deepseek-coder:6.7b-base`, with Ollama: - -```json title="config.json" -{ - "tabAutocompleteModel": { - "title": "Tab Autocomplete Model", - "provider": "ollama", - "model": "deepseek-coder:6.7b-base" - }, - ... -} -``` - -If you aren't yet familiar with the available options, you can learn more in our [overview](../setup/overview.md). - -### What model should I use? - -If you are running the model locally, we recommend `qwen2.5-coder:1.5b`. - -If you have a bit more compute, or are running a model in the cloud, you can upgrade to `qwen2.5-coder:7b`. - -Regardless of what you are willing to spend, we do not recommend using GPT or Claude for autocomplete. Learn why [below](#i-want-better-completions-should-i-use-gpt-4). - -## Configuration Options - -The following can be configured in `config.json`: - -### `tabAutocompleteModel` - -This is just another object like the ones in the `"models"` array of `config.json`. You can choose and configure any model you would like, but we strongly suggest using a small model made for tab-autocomplete, such as `deepseek-1b`, `qwen2.5-coder:1.5b`, or `starcoder-3b`. - -### `tabAutocompleteOptions` - -This object allows you to customize the behavior of tab-autocomplete. The available options are: - -- `useFileSuffix`: Determines whether to use the file suffix in the prompt. (Boolean) -- `maxPromptTokens`: The maximum number of prompt tokens to use. A smaller number will yield faster completions, but less context. (Number) -- `debounceDelay`: The delay in milliseconds before triggering autocomplete after a keystroke. (Number) -- `maxSuffixPercentage`: The maximum percentage of the prompt that can be dedicated to the suffix. (Number) -- `prefixPercentage`: The percentage of the input that should be dedicated to the prefix. (Number) -- `template`: An optional template string to be used for autocomplete. It will be rendered with the Mustache templating language, and is passed the 'prefix' and 'suffix' variables. (String) -- `multilineCompletions`: Whether to enable multiline completions ("always", "never", or "auto"). Defaults to "auto". - -### Full example - -```json title="config.json" -{ - "tabAutocompleteModel": { - "title": "Tab Autocomplete Model", - "provider": "ollama", - "model": "qwen2.5-coder:1.5b-base", - "apiBase": "https://" - }, - "tabAutocompleteOptions": { - "maxPromptTokens": 400, - "prefixPercentage": 0.5 - } -} -``` - -## Troubleshooting - -### I want better completions, should I use GPT-4? - -Perhaps surprisingly, the answer is no. The models that we suggest for autocomplete are trained with a highly specific prompt format, which allows them to respond to requests for completing code (see examples of these prompts [here](https://github.com/continuedev/continue/blob/main/core/autocomplete/templates.ts)). Some of the best commercial models like GPT-4 or Claude are not trained with this prompt format, which means that they won't generate useful completions. Luckily, a huge model is not required for great autocomplete. Most of the state-of-the-art autocomplete models are no more than 10b parameters, and increasing beyond this does not significantly improve performance. - -### I'm not seeing any completions - -Follow these steps to ensure that everything is set up correctly: - -1. Make sure you have the "Enable Tab Autocomplete" setting checked (in VS Code, you can toggle by clicking the "Continue" button in the status bar). -2. Make sure you have downloaded Ollama. -3. Run `ollama run qwen2.5-coder:1.5b-base` to verify that the model is downloaded. -4. Make sure that any other completion providers are disabled (e.g. Copilot), as they may interfere. -5. If you are using another Ollama model for chat and your resources are limited, this will cause Ollama to constantly load and unload the models from memory, resulting in slow responses (or none at all) for both. A resolution for this could be using the same model for chat and autocomplete. -6. Check the output of the logs to find any potential errors (cmd/ctrl+shift+p -> "Toggle Developer Tools" -> "Console" tab in VS Code, ~/.continue/logs/core.log in JetBrains). -7. If you are still having issues, please let us know in our [Discord](https://discord.gg/vapESyrFmJ) and we'll help as soon as possible. - -### Completions are slow - -Depending on your hardware, you may want to try a smaller, faster model. If 3b isn't working for you we recommend trying `deepseek-coder:1.3b-base`. - -### Completions don't know about my code - -We are working on this! Right now Continue uses the Language Server Protocol to add definitions to the prompt, as well as using similarity search over recently edited files. We will be improving the accuracy of this system greatly over the next few weeks. - -### Completions contain formatting errors - -If you're seeing a common pattern of mistake that might be helpful to report, please share in Discord. We will do our best to fix it as soon as possible. - -## How to turn off autocomplete - -### VS Code - -Click the "Continue" button in the status panel at the bottom right of the screen. The checkmark will become a "cancel" symbol and you will no longer see completions. You can click again to turn it back on. - -Alternatively, open VS Code settings, search for "Continue" and uncheck the box for "Enable Tab Autocomplete". - -### JetBrains - -Open Settings -> Tools -> Continue and uncheck the box for "Enable Tab Autocomplete". - -### Feedback - -If you're turning off autocomplete, we'd love to hear how we can improve! Please let us know in our [Discord](https://discord.gg/vapESyrFmJ) or file an issue on GitHub. From 89045f79e768760704f723d0e2af96ffac5d12d9 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Fri, 17 Jan 2025 03:42:50 -0800 Subject: [PATCH 007/316] config yaml examples part 1 --- docs/docs/actions/context-selection.md | 2 +- .../{how-it-works.md => how-it-works.mdx} | 4 +- docs/docs/actions/how-to-customize.md | 3 +- docs/docs/autocomplete/how-to-customize.md | 2 +- .../{model-setup.md => model-setup.mdx} | 103 +- docs/docs/chat/context-selection.md | 14 +- docs/docs/chat/model-setup.mdx | 332 ++++-- docs/docs/customize/context-providers.md | 676 ------------ docs/docs/customize/context-providers.mdx | 990 ++++++++++++++++++ .../{autocomplete.md => autocomplete.mdx} | 111 +- .../deep-dives/{codebase.md => codebase.mdx} | 43 +- .../customize/deep-dives/configuration.md | 2 +- docs/docs/customize/deep-dives/docs.md | 2 +- .../docs/customize/deep-dives/prompt-files.md | 2 +- .../model-providers/top-level/bedrock.md | 120 --- .../model-providers/top-level/bedrock.mdx | 192 ++++ .../top-level/{deepseek.md => deepseek.mdx} | 0 .../model-providers/top-level/gemini.md | 53 - .../model-providers/top-level/gemini.mdx | 80 ++ .../model-providers/top-level/mistral.md | 63 -- .../model-providers/top-level/mistral.mdx | 104 ++ .../model-providers/top-level/ollama.md | 72 -- .../model-providers/top-level/ollama.mdx | 120 +++ .../model-providers/top-level/openai.md | 103 -- .../model-providers/top-level/openai.mdx | 160 +++ .../{slash-commands.md => slash-commands.mdx} | 50 +- docs/docs/customize/{tools.md => tools.mdx} | 44 +- .../tutorials/build-your-own-slash-command.md | 10 +- docs/docs/edit/model-setup.md | 2 +- docs/docs/introduction.md | 8 +- docs/docs/json-reference.md | 451 ++++++++ docs/docs/reference.md | 620 +++++------ ...troubleshooting.md => troubleshooting.mdx} | 42 +- docs/docs/yaml-migration.md | 6 +- docs/docs/yaml-reference.md | 321 ------ .../current/actions/how-to-customize.md | 2 +- .../current/autocomplete/how-to-customize.md | 2 +- .../current/chat/context-selection.md | 14 +- .../current/chat/model-setup.mdx | 2 +- .../customize/deep-dives/autocomplete.md | 2 +- .../current/customize/deep-dives/codebase.md | 2 +- .../customize/deep-dives/prompt-files.md | 2 +- .../current/customize/overview.md | 4 +- .../current/edit/model-setup.md | 2 +- docs/sidebars.js | 10 +- 45 files changed, 2898 insertions(+), 2051 deletions(-) rename docs/docs/actions/{how-it-works.md => how-it-works.mdx} (85%) rename docs/docs/autocomplete/{model-setup.md => model-setup.mdx} (51%) delete mode 100644 docs/docs/customize/context-providers.md create mode 100644 docs/docs/customize/context-providers.mdx rename docs/docs/customize/deep-dives/{autocomplete.md => autocomplete.mdx} (79%) rename docs/docs/customize/deep-dives/{codebase.md => codebase.mdx} (81%) delete mode 100644 docs/docs/customize/model-providers/top-level/bedrock.md create mode 100644 docs/docs/customize/model-providers/top-level/bedrock.mdx rename docs/docs/customize/model-providers/top-level/{deepseek.md => deepseek.mdx} (100%) delete mode 100644 docs/docs/customize/model-providers/top-level/gemini.md create mode 100644 docs/docs/customize/model-providers/top-level/gemini.mdx delete mode 100644 docs/docs/customize/model-providers/top-level/mistral.md create mode 100644 docs/docs/customize/model-providers/top-level/mistral.mdx delete mode 100644 docs/docs/customize/model-providers/top-level/ollama.md create mode 100644 docs/docs/customize/model-providers/top-level/ollama.mdx delete mode 100644 docs/docs/customize/model-providers/top-level/openai.md create mode 100644 docs/docs/customize/model-providers/top-level/openai.mdx rename docs/docs/customize/{slash-commands.md => slash-commands.mdx} (77%) rename docs/docs/customize/{tools.md => tools.mdx} (67%) create mode 100644 docs/docs/json-reference.md rename docs/docs/{troubleshooting.md => troubleshooting.mdx} (91%) delete mode 100644 docs/docs/yaml-reference.md diff --git a/docs/docs/actions/context-selection.md b/docs/docs/actions/context-selection.md index a63eeda38..4e154dcd3 100644 --- a/docs/docs/actions/context-selection.md +++ b/docs/docs/actions/context-selection.md @@ -7,7 +7,7 @@ sidebar_position: 3 ## Slash commands -Slash commands can be combined with additional instructions, including [context providers](chat/context-selection.md) or [highlighted code](chat/context-selection.md). +Slash commands can be combined with additional instructions, including [context providers](../customize/context-providers.mdx) or [highlighted code](../edit/context-selection#highlighted-code). For example, with the “/edit” slash command you should describe the edit that you want the LLM to perform. diff --git a/docs/docs/actions/how-it-works.md b/docs/docs/actions/how-it-works.mdx similarity index 85% rename from docs/docs/actions/how-it-works.md rename to docs/docs/actions/how-it-works.mdx index 57afa90ea..49d2e8db0 100644 --- a/docs/docs/actions/how-it-works.md +++ b/docs/docs/actions/how-it-works.mdx @@ -7,6 +7,6 @@ sidebar_position: 4 While many Actions are based on templated prompts and can be customized with .prompt files, there are a number that execute more complex code under the hood. -Actions that generate inline diffs, like “/edit”, “/comment”, or right click actions, use the same prompt and response processing logic as [Edit](edit/how-it-works.md). +Actions that generate inline diffs, like “/edit”, “/comment”, or right click actions, use the same prompt and response processing logic as [Edit](edit/how-it-works). -To learn how other slash commands work, see the full reference [here](../customize/slash-commands.md). +To learn how other slash commands work, see the full reference [here](../customize/slash-commands). diff --git a/docs/docs/actions/how-to-customize.md b/docs/docs/actions/how-to-customize.md index 81d33967b..0cd40903a 100644 --- a/docs/docs/actions/how-to-customize.md +++ b/docs/docs/actions/how-to-customize.md @@ -7,7 +7,7 @@ sidebar_position: 5 ## Built-in slash commands -Continue has a large library of built-in slash commands, but when you first install we only display the most commonly used ones, like “/edit”, “/comment”, and “/share”. To add more actions, you can open [config.json](../reference.md) and add them to the `slashCommands` array. +Continue has a large library of built-in slash commands, but when you first install we only display the most commonly used ones, like “/edit”, “/comment”, and “/share”. To add more actions, you can open [config.json](../json-reference.md) and add them to the `slashCommands` array. ## Custom slash commands @@ -50,6 +50,7 @@ export function modifyConfig(config: Config): Config { return config; } ``` + diff --git a/docs/docs/autocomplete/how-to-customize.md b/docs/docs/autocomplete/how-to-customize.md index 066621368..317b09775 100644 --- a/docs/docs/autocomplete/how-to-customize.md +++ b/docs/docs/autocomplete/how-to-customize.md @@ -5,7 +5,7 @@ keywords: [customize] sidebar_position: 5 --- -Continue offers a handful of parameters in [`config.json`](../reference.md) that can be tuned to find the perfect balance between suggestion quality and system performance for your specific needs and hardware capabilities: +Continue offers a handful of parameters in [`config.json` (Deprecated)](../json-reference.md) that can be tuned to find the perfect balance between suggestion quality and system performance for your specific needs and hardware capabilities: ```json title="config.json (Deprecated)" "tabAutocompleteOptions": { diff --git a/docs/docs/autocomplete/model-setup.md b/docs/docs/autocomplete/model-setup.mdx similarity index 51% rename from docs/docs/autocomplete/model-setup.md rename to docs/docs/autocomplete/model-setup.mdx index c42c8318c..e975e51fe 100644 --- a/docs/docs/autocomplete/model-setup.md +++ b/docs/docs/autocomplete/model-setup.mdx @@ -5,24 +5,40 @@ keywords: [model, autocomplete] sidebar_position: 2 --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + :::info -This page recommends models and providers for Autocomplete. Read more about how to set up your `config.json` [here](../reference.md). +This page recommends models and providers for Autocomplete. Read more about how to set up your `config.yaml` [here](../reference.md). ::: ## Best overall experience For the best Autocomplete experience, we recommend using Codestral through the [Mistral API](https://console.mistral.ai/). This model offers high-quality completions with an excellent understanding of code context: -```json title="config.json (Deprecated)"" -{ - "tabAutocompleteModel": { - "title": "Codestral", - "provider": "mistral", - "model": "codestral-latest", - "apiKey": "YOUR_API_KEY" - } -} -``` + + + ```yaml title="config.yaml" + models: + - name: Codestral + provider: mistral + model: codestral-latest + apiKey: YOUR_API_KEY + roles: + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" + "tabAutocompleteModel": { + "title": "Codestral", + "provider": "mistral", + "model": "codestral-latest", + "apiKey": "YOUR_API_KEY" + } + ``` + + :::tip[Codestral API Key] The API keys for Codestral and the general Mistral APIs are different. If you are using Codestral, you probably want a Codestral API key, but if you are sharing the key as a team or otherwise want to use `api.mistral.ai`, then make sure to set `"apiBase": "https://api.mistral.ai/v1"` in your `tabAutocompleteModel`. @@ -32,38 +48,65 @@ The API keys for Codestral and the general Mistral APIs are different. If you ar For those preferring local execution or self-hosting,`Qwen2.5-Coder 1.5B` offers a good balance of performance and quality for most users (e.g. using [Ollama](../customize/model-providers/top-level/ollama.md) or [LM Studio](../customize/model-providers/more/lmstudio.md)). -```json title="config.json (Deprecated)"" -{ - "tabAutocompleteModel": { - "title": "Qwen2.5-Coder 1.5B", - "model": "qwen2.5-coder:1.5b-base", - "provider": "ollama" + + + ```yaml title="config.yaml" + models: + - name: Qwen2.5-Coder 1.5B + model: qwen2.5-coder:1.5b-base + provider: ollama + roles: + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" + { + "tabAutocompleteModel": { + "title": "Qwen2.5-Coder 1.5B", + "model": "qwen2.5-coder:1.5b-base", + "provider": "ollama" + } } -} -``` + ``` + + Have more compute? Use `qwen2.5-coder:7b-base` for potentially higher-quality suggestions. :::note - For LM Studio users, navigate to the "My Models" section, find your desired model, and copy the path (e.g., `Qwen/Qwen2.5-Coder-1.5B-Instruct-GGUF/qwen2.5-coder-1.5b-instruct-q4_k_m.gguf`). Use this path as the `model` value in your configuration. - ::: ### Using a remote instance When using a remote instance you need to set the `"apiBase"` value in the configuration: -```json title="config.json (Deprecated)"" -{ - "tabAutocompleteModel": { - "title": "Qwen2.5-Coder 1.5B", - "model": "qwen2.5-coder:1.5b-base", - "provider": "ollama" - "apiBase": "http://:11434" + + + ```yaml title="config.yaml" + models: + - name: Qwen2.5-Coder 1.5B + model: qwen2.5-coder:1.5b-base + provider: ollama + apiBase: http://:11434 + roles: + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" + { + "tabAutocompleteModel": { + "title": "Qwen2.5-Coder 1.5B", + "model": "qwen2.5-coder:1.5b-base", + "provider": "ollama", + "apiBase": "http://:11434" + } } -} -``` + ``` + + ## Other experiences diff --git a/docs/docs/chat/context-selection.md b/docs/docs/chat/context-selection.md index e4c35ddc5..e32ea3c51 100644 --- a/docs/docs/chat/context-selection.md +++ b/docs/docs/chat/context-selection.md @@ -19,28 +19,28 @@ You can include the currently open file as context by pressing opt + ## Specific file -You can include a specific file in your current workspace as context by typing [`@Files`](../customize/context-providers.md#file) and selecting the file. +You can include a specific file in your current workspace as context by typing [`@Files`](../customize/context-providers.mdx#file) and selecting the file. ## Specific folder -You can include a folder in your current workspace as context by typing [`@Folder`](../customize/context-providers.md#folder) and selecting the directory. It [works like `@Codebase`](../customize/deep-dives/codebase.md) but only includes the files in the selected folder. +You can include a folder in your current workspace as context by typing [`@Folder`](../customize/context-providers.mdx#folder) and selecting the directory. It [works like `@Codebase`](../customize/deep-dives/codebase.md) but only includes the files in the selected folder. ## Codebase search -You can automatically include relevant files from your codebase as context by typing [`@Codebase`](../customize/context-providers.md#codebase). You can learn about how @Codebase works [here](../customize/deep-dives/codebase.md). +You can automatically include relevant files from your codebase as context by typing [`@Codebase`](../customize/context-providers.mdx#codebase). You can learn about how @Codebase works [here](../customize/deep-dives/codebase.md). ## Documentation site -You can include a documentation site as context by typing [`@Docs`](../customize/context-providers.md#docs) and selecting the documentation site. You can learn about how @Docs works [here](../customize/deep-dives/docs.md). +You can include a documentation site as context by typing [`@Docs`](../customize/context-providers.mdx#docs) and selecting the documentation site. You can learn about how @Docs works [here](../customize/deep-dives/docs.md). ## Terminal contents -You can include the contents of the terminal in your IDE as context by typing [`@Terminal`](../customize/context-providers.md#terminal). +You can include the contents of the terminal in your IDE as context by typing [`@Terminal`](../customize/context-providers.mdx#terminal). ## Git diff -You can include all of the changes you've made to your current branch by typing [`@Git Diff`](../customize/context-providers.md#git-diff). +You can include all of the changes you've made to your current branch by typing [`@Git Diff`](../customize/context-providers.mdx#git-diff). ## Other context -You can see a full list of built-in context providers [here](../customize/context-providers.md) and how to create your own custom context provider [here](../customize/tutorials/build-your-own-context-provider.md). +You can see a full list of built-in context providers [here](../customize/context-providers.mdx) and how to create your own custom context provider [here](../customize/tutorials/build-your-own-context-provider.md). diff --git a/docs/docs/chat/model-setup.mdx b/docs/docs/chat/model-setup.mdx index b055adf24..9bdb09c7c 100644 --- a/docs/docs/chat/model-setup.mdx +++ b/docs/docs/chat/model-setup.mdx @@ -9,7 +9,7 @@ import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; :::info -This page recommends models and providers for Chat. Read more about how to set up your `config.json` [here](../reference.md). +This page recommends models and providers for Chat. Read more about how to set up your config [here](../reference.md). ::: ## Best overall experience @@ -20,99 +20,180 @@ For the best overall Chat experience, you will want to use a 400B+ parameter mod Our current top recommendation is Claude Sonnet 3.5 from [Anthropic](../customize/model-providers/top-level/anthropic.md). -```json title="config.json (Deprecated)" - "models": [ - { - "title": "Claude 3.5 Sonnet", - "provider": "anthropic", - "model": "claude-3-5-sonnet-latest", - "apiKey": "[ANTHROPIC_API_KEY]" - } - ] -``` + + + ```yaml title="Package or config.yaml" + models: + - title: Claude 3.5 Sonnet + provider: anthropic + model: claude-3-5-sonnet-latest + apiKeySecret: ANTHROPIC_API_KEY + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Claude 3.5 Sonnet", + "provider": "anthropic", + "model": "claude-3-5-sonnet-latest", + "apiKey": "[ANTHROPIC_API_KEY]" + } + ] + ``` + + ### Llama 3.1 405B from Meta If you prefer to use an open-weight model, then Llama 3.1 405B from Meta is your best option right now. You will need to decide if you use it through a SaaS model provider (e.g. [Together](../customize/model-providers/more/together.md) or [Groq](../customize/model-providers/more/groq.md)) or self-host it (e.g. using [vLLM](../customize/model-providers//more/vllm.md) or [Ollama](../customize/model-providers/top-level/ollama.md)). - - - ```json title="config.json (Deprecated)" - "models": [ - { - "title": "Llama 3.1 405B", - "provider": "together", - "model": "llama3.1-405b", - "apiKey": "[TOGETHER_API_KEY]" - } - ] + + + + + ```yaml title="Package or config.yaml" + models: + - title: "Llama 3.1 405B" + provider: "together" + model: "llama3.1-405b" + apiKeySecret: "TOGETHER_API_KEY" ``` - - - ```json title="config.json (Deprecated)" - "models": [ - { - "title": "Llama 3.1 405B", - "provider": "groq", - "model": "llama3.1-405b", - "apiKey": "[GROQ_API_KEY]" - } - ] + + + ```yaml title="Package or config.yaml" + models: + - title: "Llama 3.1 405B" + provider: "groq" + model: "llama3.1-405b" + apiKeySecret: "GROQ_API_KEY" ``` - - - ```json title="config.json (Deprecated)" - "models": [ - { - "title": "Llama 3.1 405B", - "provider": "vllm", - "model": "llama3.1-405b" - } - ] + + + ```yaml title="Package or config.yaml" + models: + - title: "Llama 3.1 405B" + provider: "vllm" + model: "llama3.1-405b" ``` - - - ```json title="config.json (Deprecated)" - "models": [ - { - "title": "Llama 3.1 405B", - "provider": "ollama", - "model": "llama3.1:405b" - } - ] + + + ```yaml title="Package or config.yaml" + models: + - title: "Llama 3.1 405B" + provider: "ollama" + model: "llama3.1:405b" ``` - + + + + + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama 3.1 405B", + "provider": "together", + "model": "llama3.1-405b", + "apiKey": "[TOGETHER_API_KEY]" + } + ] + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama 3.1 405B", + "provider": "groq", + "model": "llama3.1-405b", + "apiKey": "[GROQ_API_KEY]" + } + ] + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama 3.1 405B", + "provider": "vllm", + "model": "llama3.1-405b" + } + ] + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama 3.1 405B", + "provider": "ollama", + "model": "llama3.1:405b" + } + ] + ``` + + + ### GPT-4o from OpenAI If you prefer to use a model from [OpenAI](../customize/model-providers/top-level/openai.md), then we recommend GPT-4o. -```json title="config.json (Deprecated)" - "models": [ - { - "title": "GPT-4o", - "provider": "openai", - "model": "", - "apiKey": "[OPENAI_API_KEY]" - } - ] -``` + + + ```yaml title="Package or config.yaml" + models: + - title: GPT-4o + provider: openai + model: '' + apiKey: [OPENAI_API_KEY] + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "GPT-4o", + "provider": "openai", + "model": "", + "apiKey": "[OPENAI_API_KEY]" + } + ] + ``` + + ### Gemini 1.5 Pro from Google If you prefer to use a model from [Google](../customize/model-providers/top-level/gemini.md), then we recommend Gemini 1.5 Pro. -```json title="config.json (Deprecated)" - "models": [ - { - "title": "Gemini 1.5 Pro", - "provider": "gemini", - "model": "gemini-1.5-pro-latest", - "apiKey": "[GEMINI_API_KEY]" - } - ] -``` + + + ```yaml title="Package or config.yaml" + models: + - title: Gemini 1.5 Pro + provider: gemini + model: gemini-1.5-pro-latest + apiKey: [GEMINI_API_KEY] + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Gemini 1.5 Pro", + "provider": "gemini", + "model": "gemini-1.5-pro-latest", + "apiKey": "[GEMINI_API_KEY]" + } + ] + ``` + + ## Local, offline experience @@ -122,37 +203,83 @@ For the best local, offline Chat experience, you will want to use a model that i If your local machine can run an 8B parameter model, then we recommend running Llama 3.1 8B on your machine (e.g. using [Ollama](../customize/model-providers/top-level/ollama.md) or [LM Studio](../customize/model-providers/more/lmstudio.md)). - - - ```json title="config.json (Deprecated)" - "models": [ - { - "title": "Llama 3.1 8B", - "provider": "ollama", - "model": "llama3.1:8b" - } - ] + + + + + ```yaml title="Package or config.yaml" + models: + - title: Llama 3.1 8B + provider: ollama + model: llama3.1:8b ``` - - - ```json title="config.json (Deprecated)" - "models": [ - { - "title": "Llama 3.1 8B", - "provider": "lmstudio", - "model": "llama3.1-8b" - } - ] + + + ```yaml title="Package or config.yaml" + models: + - title: Llama 3.1 8B + provider: lmstudio + model: llama3.1:8b ``` - + + + + + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama 3.1 8B", + "provider": "ollama", + "model": "llama3.1:8b" + } + ] + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama 3.1 8B", + "provider": "lmstudio", + "model": "llama3.1-8b" + } + ] + ``` + + + ### DeepSeek Coder 2 16B If your local machine can run a 16B parameter model, then we recommend running DeepSeek Coder 2 16B (e.g. using [Ollama](../customize/model-providers/top-level/ollama.md) or [LM Studio](../customize/model-providers/more/lmstudio.md)). - - + + + + + ```yaml title="Package or config.yaml" + models: + - title: DeepSeek Coder 2 16B + provider: ollama + model: deepseek-coder-v2:16b + ``` + + + ```yaml title="Package or config.yaml" + models: + - title: DeepSeek Coder 2 16B + provider: lmstudio + model: deepseek-coder-v2:16b + ``` + + + + + + ```json title="config.json (Deprecated)" "models": [ { @@ -162,10 +289,8 @@ If your local machine can run a 16B parameter model, then we recommend running D } ] ``` - - - - + + ```json title="config.json (Deprecated)" "models": [ { @@ -175,8 +300,9 @@ If your local machine can run a 16B parameter model, then we recommend running D } ] ``` - - + + + ## Other experiences diff --git a/docs/docs/customize/context-providers.md b/docs/docs/customize/context-providers.md deleted file mode 100644 index daf8b2d83..000000000 --- a/docs/docs/customize/context-providers.md +++ /dev/null @@ -1,676 +0,0 @@ ---- -title: Context providers -description: Type '@' to select content to the LLM as context -keywords: [context, "@", provider, LLM] ---- - -Context Providers allow you to type '@' and see a dropdown of content that can all be fed to the LLM as context. Every context provider is a plugin, which means if you want to reference some source of information that you don't see here, you can request (or build!) a new context provider. - -As an example, say you are working on solving a new GitHub Issue. You type '@Issue' and select the one you are working on. Continue can now see the issue title and contents. You also know that the issue is related to the files 'readme.md' and 'helloNested.py', so you type '@readme' and '@hello' to find and select them. Now these 3 "Context Items" are displayed inline with the rest of your input. - -![Context Items](/img/context-provider-example.png) - -## Built-in Context Providers - -To use any of the built-in context providers, open `config.json` and add it to the `contextProviders` list. - -### `@File` - -Reference any file in your current workspace. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "file" - } - ] -} -``` - -### `@Code` - -Reference specific functions or classes from throughout your project. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "code" - } - ] -} -``` - -### `@Git Diff` - -Reference all of the changes you've made to your current branch. This is useful if you want to summarize what you've done or ask for a general review of your work before committing. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "diff" - } - ] -} -``` - -### `@Current File` - -Reference the currently open file. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "currentFile" - } - ] -} -``` - -### `@Terminal` - -Reference the last command you ran in your IDE's terminal and its output. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "terminal" - } - ] -} -``` - -### `@Docs` - -Reference the contents from any documentation site. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "docs" - } - ] -} -``` - -Note that this will only enable the `@Docs` context provider. - -To use it, you need to add a documentation site to your `config.json`. See the [docs](../customize/deep-dives/docs.md) page for more information. - -### `@Open` - -Reference the contents of all of your open files. Set `onlyPinned` to `true` to only reference pinned files. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "open", - "params": { - "onlyPinned": true - } - } - ] -} -``` - -### `@Web` - -Reference relevant pages from across the web, automatically determined from your input. - -Optionally, set "n" to limit the number of results returned (default 6). - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "web", - "params": { - "n": 5 - } - } - ] -} -``` - -### `@Codebase` - -Reference the most relevant snippets from your codebase. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "codebase" - } - ] -} -``` - -Read more about indexing and retrieval [here](../customize/deep-dives/codebase.md). - -### `@Folder` - -Uses the same retrieval mechanism as `@Codebase`, but only on a single folder. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "folder" - } - ] -} -``` - -### `@Search` - -Reference the results of codebase search, just like the results you would get from VS Code search. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "search" - } - ] -} -``` - -This context provider is powered by [ripgrep](https://github.com/BurntSushi/ripgrep). - -### `@Url` - -Reference the markdown converted contents of a given URL. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "url" - } - ] -} -``` - -### `@Clipboard` - -Reference recent clipboard items - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "clipboard" - } - ] -} -``` - -### `@Tree` - -Reference the structure of your current workspace. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "tree" - } - ] -} -``` - -### `@Problems` - -Get Problems from the current file. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "problems" - } - ] -} -``` - -### `@Debugger` - -Reference the contents of the local variables in the debugger. Currently only available in VS Code. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "debugger", - "params": { - "stackDepth": 3 - } - } - ] -} -``` - -Uses the top _n_ levels (defaulting to 3) of the call stack for that thread. - -### `@Repository Map` - -Reference the outline of your codebase. By default, signatures are included along with file in the repo map. - -`includeSignatures` params can be set to false to exclude signatures. This could be necessary for large codebases and/or to reduce context size significantly. Signatures will not be included if indexing is disabled. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "repo-map", - "params": { - "includeSignatures": false // default true - } - } - ] -} -``` - -Provides a list of files and the call signatures of top-level classes, functions, and methods in those files. This helps the model better understand how a particular piece of code relates to the rest of the codebase. - -In the submenu that appears, you can select either `Entire codebase`, or specify a subfolder to generate the repostiory map from. - -This context provider is inpsired by [Aider's repository map](https://aider.chat/2023/10/22/repomap.html). - -### `@Operating System` - -Reference the architecture and platform of your current operating system. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "os" - } - ] -} -``` - -### Model Context Protocol - -The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a standard proposed by Anthropic to unify prompts, context, and tool use. Continue supports any MCP server with the MCP context provider. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then configure your `config.json` like this: - -```json title="config.json (Deprecated)" -{ - "experimental": { - "modelContextProtocolServers": [ - { - "transport": { - "type": "stdio", - "command": "uvx", - "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"] - } - } - ] - } -} -``` - -You'll then be able to type "@" and see "MCP" in the context providers dropdown. - -### Prompt Files - -See [Prompt Files](/customize/deep-dives/prompt-files). Prompt files are not added directly to the config file; prompt files are parsed and injected into the config automatically, to be used like other context providers. - -### `@Issue` - -Reference the conversation in a GitHub issue. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "issue", - "params": { - "repos": [ - { - "owner": "continuedev", - "repo": "continue" - } - ], - "githubToken": "ghp_xxx" - } - } - ] -} -``` - -Make sure to include your own [GitHub personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token) to avoid being rate-limited. - -### `@Database` - -Reference table schemas from Sqlite, Postgres, MSSQL, and MySQL databases. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "database", - "params": { - "connections": [ - { - "name": "examplePostgres", - "connection_type": "postgres", - "connection": { - "user": "username", - "host": "localhost", - "database": "exampleDB", - "password": "yourPassword", - "port": 5432 - } - }, - { - "name": "exampleMssql", - "connection_type": "mssql", - "connection": { - "user": "username", - "server": "localhost", - "database": "exampleDB", - "password": "yourPassword" - } - }, - { - "name": "exampleSqlite", - "connection_type": "sqlite", - "connection": { - "filename": "/path/to/your/sqlite/database.db" - } - } - ] - } - } - ] -} -``` - -Each connection should include a unique name, the `connection_type`, and the necessary connection parameters specific to each database type. - -Available connection types: - -- `postgres` -- `mysql` -- `sqlite` - -### `@Postgres` - -Reference the schema of a table, and some sample rows - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "postgres", - "params": { - "host": "localhost", - "port": 5436, - "user": "myuser", - "password": "catsarecool", - "database": "animals", - "schema": "public", - "sampleRows": 3 - } - } - ] -} -``` - -The only required settings are those for creating the database connection: `host`, `port`, `user`, `password`, and `database`. - -By default, the `schema` filter is set to `public`, and the `sampleRows` is set to 3. You may unset the schema if you want to include tables from all schemas. - -[Here is a short demo.](https://github.com/continuedev/continue/pull/859) - -### `@Google` - -Reference the results of a Google search. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "google", - "params": { - "serperApiKey": "" - } - } - ] -} -``` - -For example, type "@Google python tutorial" if you want to search and discuss ways of learning Python. - -Note: You can get an API key for free at [serper.dev](https://serper.dev). - -### `@Gitlab Merge Request` - -Reference an open MR for this branch on GitLab. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "gitlab-mr", - "params": { - "token": "..." - } - } - ] -} -``` - -You will need to create a [personal access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) with the `read_api` scope. - -#### Using Self-Hosted GitLab - -You can specify the domain to communicate with by setting the `domain` parameter in your configurtion. By default this is set to `gitlab.com`. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "gitlab-mr", - "params": { - "token": "...", - "domain": "gitlab.example.com" - } - } - ] -} -``` - -#### Filtering Comments - -If you select some code to be edited, you can have the context provider filter out comments for other files. To enable this feature, set `filterComments` to `true`. - -### `@Jira` - -Reference the conversation in a Jira issue. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "jira", - "params": { - "domain": "company.atlassian.net", - "token": "ATATT..." - } - } - ] -} -``` - -Make sure to include your own [Atlassian API Token](https://id.atlassian.com/manage-profile/security/api-tokens), or use your `email` and `token`, with token set to your password for basic authentication. If you use your own Atlassian API Token, don't configure your email. - -#### Jira Datacenter Support - -This context provider supports both Jira API version 2 and 3. It will use version 3 by default since -that's what the cloud version uses, but if you have the datacenter version of Jira, you'll need -to set the API Version to 2 using the `apiVersion` property. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "jira", - "params": { - "apiVersion": "2" - } - } - ] -} -``` - -#### Issue Query - -By default, the following query will be used to find issues: - -```jql -assignee = currentUser() AND resolution = Unresolved order by updated DESC -``` - -You can override this query by setting the `issueQuery` parameter. - -### `@Discord` - -Reference the messages in a Discord channel. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "discord", - "params": { - "discordKey": "bot token", - "guildId": "1234567890", - "channels": [ - { - "id": "123456", - "name": "example-channel" - }, - { - "id": "678901", - "name": "example-channel-2" - } - ] - } - } - ] -} -``` - -Make sure to include your own [Bot Token](https://discord.com/developers/applications), and join it to your related server . If you want more granular control over which channels are searched, you can specify a list of channel IDs to search in. If you don't want to specify any channels, just include the guild id(Server ID) and all channels will be included. The provider only reads text channels. - -### `@HTTP` - -The HttpContextProvider makes a POST request to the url passed in the configuration. The server must return 200 OK with a ContextItem object or an array of ContextItems. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "http", - "params": { - "url": "https://api.example.com/v1/users" - } - } - ] -} -``` - -The receiving URL should expect to receive the following parameters: - -```js title="POST parameters" -{ - query: string, - fullInput: string -} -``` - -The response 200 OK should be a JSON object with the following structure: - -```json title="Response" -[ - { - "name": "", - "description": "", - "content": "" - } -] - -// OR -{ - "name": "", - "description": "", - "content": "" -} -``` - -### `@Commits` - -Reference specific git commit metadata and diff or all of the recent commits. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "commit", - "params": { - "Depth": 50, - "LastXCommitsDepth": 10 - } - } - ] -} -``` - -The depth is how many commits will be loaded into the submenu, defaults to 50. -The LastXCommitsDepth is how many recent commits will be included, defaults to 10. - -### `@Clipboard` - -Reference recent clipboard items - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "clipboard" - } - ] -} -``` - -### `@Greptile` - -Query a [Greptile](https://www.greptile.com/) index of the current repo/branch. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "greptile", - "params": { - "GreptileToken": "...", - "GithubToken": "..." - } - } - ] -} -``` - -### Requesting Context Providers - -Not seeing what you want? Create an issue [here](https://github.com/continuedev/continue/issues/new?assignees=TyDunn&labels=enhancement&projects=&template=feature-request-%F0%9F%92%AA.md&title=) to request a new Context Provider. diff --git a/docs/docs/customize/context-providers.mdx b/docs/docs/customize/context-providers.mdx new file mode 100644 index 000000000..667b055f9 --- /dev/null +++ b/docs/docs/customize/context-providers.mdx @@ -0,0 +1,990 @@ +--- +title: Context providers +description: Type '@' to select content to the LLM as context +keywords: [context, "@", provider, LLM] +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +Context Providers allow you to type '@' and see a dropdown of content that can all be fed to the LLM as context. Every context provider is a plugin, which means if you want to reference some source of information that you don't see here, you can request (or build!) a new context provider. + +As an example, say you are working on solving a new GitHub Issue. You type '@Issue' and select the one you are working on. Continue can now see the issue title and contents. You also know that the issue is related to the files 'readme.md' and 'helloNested.py', so you type '@readme' and '@hello' to find and select them. Now these 3 "Context Items" are displayed inline with the rest of your input. + +![Context Items](/img/context-provider-example.png) + +## Built-in Context Providers + +To use any of the built-in context providers, open `config.json` and add it to the `contextProviders` list. + +### `@File` + +Reference any file in your current workspace. + + + + ```yaml title="Package or config.yaml" + context: + - uses: file + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "file" + } + ] + ``` + + + +### `@Code` + +Reference specific functions or classes from throughout your project. + + + + ```yaml title="Package or config.yaml" + context: + - uses: code + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "code" + } + ] + ``` + + + +### `@Git Diff` + +Reference all of the changes you've made to your current branch. This is useful if you want to summarize what you've done or ask for a general review of your work before committing. + + + + ```yaml title="Package or config.yaml" + context: + - uses: diff + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "diff" + } + ] + ``` + + + +### `@Current File` + +Reference the currently open file. + + + + ```yaml title="Package or config.yaml" + context: + - uses: currentFile + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "currentFile" + } + ] + ``` + + + +### `@Terminal` + +Reference the last command you ran in your IDE's terminal and its output. + + + + ```yaml title="Package or config.yaml" + context: + - uses: terminal + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "terminal" + } + ] + ``` + + + +### `@Docs` + +Reference the contents from any documentation site. + + + + ```yaml title="Package or config.yaml" + context: + - uses: docs + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "docs" + } + ] + ``` + + + +Note that this will only enable the `@Docs` context provider. + +To use it, you need to add a documentation site to your `config.json`. See the [docs](../customize/deep-dives/docs.md) page for more information. + +### `@Open` + +Reference the contents of all of your open files. Set `onlyPinned` to `true` to only reference pinned files. + + + + ```yaml title="Package or config.yaml" + context: + - uses: open + with: + onlyPinned: true + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "open", + "params": { + "onlyPinned": true + } + } + ] + ``` + + + +### `@Web` + +Reference relevant pages from across the web, automatically determined from your input. + +Optionally, set `n` to limit the number of results returned (default 6). + + + + ```yaml title="Package or config.yaml" + context: + - uses: web + with: + n: 5 + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "web", + "params": { + "n": 5 + } + } + ] + ``` + + + +### `@Codebase` + +Reference the most relevant snippets from your codebase. + + + + ```yaml title="Package or config.yaml" + context: + - uses: codebase + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "codebase" + } + ] + ``` + + + +Read more about indexing and retrieval [here](../customize/deep-dives/codebase.md). + +### `@Folder` + +Uses the same retrieval mechanism as `@Codebase`, but only on a single folder. + + + + ```yaml title="Package or config.yaml" + context: + - uses: folder + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "folder" + } + ] + ``` + + + +### `@Search` + +Reference the results of codebase search, just like the results you would get from VS Code search. + + + + ```yaml title="Package or config.yaml" + context: + - uses: search + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "search" + } + ] + ``` + + + +This context provider is powered by [ripgrep](https://github.com/BurntSushi/ripgrep). + +This context provider is powered by [ripgrep](https://github.com/BurntSushi/ripgrep). + +### `@Url` + +Reference the markdown converted contents of a given URL. + + + + ```yaml title="Package or config.yaml" + context: + - uses: url + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "url" + } + ] + ``` + + + +### `@Clipboard` + +Reference recent clipboard items + + + + ```yaml title="Package or config.yaml" + context: + - uses: clipboard + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "clipboard" + } + ] + ``` + + + +### `@Tree` + +Reference the structure of your current workspace. + + + + ```yaml title="Package or config.yaml" + context: + - uses: tree + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "tree" + } + ] + ``` + + + +### `@Problems` + +Get Problems from the current file. + + + + ```yaml title="Package or config.yaml" + context: + - uses: problems + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "problems" + } + ] + ``` + + + +### `@Debugger` + +Reference the contents of the local variables in the debugger. Currently only available in VS Code. + + + + ```yaml title="Package or config.yaml" + context: + - uses: debugger + with: + stackDepth: 3 + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "debugger", + "params": { + "stackDepth": 3 + } + } + ] + ``` + + + +Uses the top _n_ levels (defaulting to 3) of the call stack for that thread. + +### `@Repository Map` + +Reference the outline of your codebase. By default, signatures are included along with file in the repo map. + +`includeSignatures` params can be set to false to exclude signatures. This could be necessary for large codebases and/or to reduce context size significantly. Signatures will not be included if indexing is disabled. + + + + ```yaml title="Package or config.yaml" + context: + - uses: repo-map + with: + includeSignatures: false # default true + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "repo-map", + "params": { + "includeSignatures": false // default true + } + } + ] + ``` + + + +Provides a list of files and the call signatures of top-level classes, functions, and methods in those files. This helps the model better understand how a particular piece of code relates to the rest of the codebase. + +In the submenu that appears, you can select either `Entire codebase`, or specify a subfolder to generate the repostiory map from. + +This context provider is inpsired by [Aider's repository map](https://aider.chat/2023/10/22/repomap.html). + +### `@Operating System` + +Reference the architecture and platform of your current operating system. + + + + ```yaml title="Package or config.yaml" + context: + - uses: os + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "os" + } + ] + ``` + + + +### Model Context Protocol + +The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a standard proposed by Anthropic to unify prompts, context, and tool use. Continue supports any MCP server with the MCP context provider. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then set up your configuration like this: + + + + ```yaml title="Package or config.yaml" + mcpServers: + - name: My MCP Server + command: uvx + args: + - mcp-server-sqlite + - --db-path + - /Users/NAME/test.db + ``` + + + ```json title="config.json (Deprecated)" + "experimental": { + "modelContextProtocolServers": [ + { + "transport": { + "type": "stdio", + "command": "uvx", + "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"] + } + } + ] + } + ``` + + + +You'll then be able to type "@" and see "MCP" in the context providers dropdown. + +### Prompt Files + +See [Prompt Files](/customize/deep-dives/prompt-files). Prompt files are not added directly to the config file; prompt files are parsed and injected into the config automatically, to be used like other context providers. + +### `@Issue` + +Reference the conversation in a GitHub issue. + + + + ```yaml title="Package or config.yaml" + context: + - uses: issue + with: + repos: + - owner: continuedev + repo: continue + githubToken: ghp_xxx + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "issue", + "params": { + "repos": [ + { + "owner": "continuedev", + "repo": "continue" + } + ], + "githubToken": "ghp_xxx" + } + } + ] + ``` + + + +Make sure to include your own [GitHub personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token) to avoid being rate-limited. + +### `@Database` + +Reference table schemas from Sqlite, Postgres, MSSQL, and MySQL databases. + + + + ```yaml title="Package or config.yaml" + context: + - uses: database + with: + connections: + - name: examplePostgres + connection_type: postgres + connection: + user: username + host: localhost + database: exampleDB + password: yourPassword + port: 5432 + - name: exampleMssql + connection_type: mssql + connection: + user: username + server: localhost + database: exampleDB + password: yourPassword + - name: exampleSqlite + connection_type: sqlite + connection: + filename: /path/to/your/sqlite/database.db + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "database", + "params": { + "connections": [ + { + "name": "examplePostgres", + "connection_type": "postgres", + "connection": { + "user": "username", + "host": "localhost", + "database": "exampleDB", + "password": "yourPassword", + "port": 5432 + } + }, + { + "name": "exampleMssql", + "connection_type": "mssql", + "connection": { + "user": "username", + "server": "localhost", + "database": "exampleDB", + "password": "yourPassword" + } + }, + { + "name": "exampleSqlite", + "connection_type": "sqlite", + "connection": { + "filename": "/path/to/your/sqlite/database.db" + } + } + ] + } + } + ] + ``` + + + +Each connection should include a unique name, the `connection_type`, and the necessary connection parameters specific to each database type. + +Available connection types: + +- `postgres` +- `mysql` +- `sqlite` + +### `@Postgres` + +Reference the schema of a table, and some sample rows + + + + ```yaml title="Package or config.yaml" + context: + - uses: postgres + with: + host: localhost + port: 5436 + user: myuser + password: catsarecool + database: animals + schema: public + sampleRows: 3 + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "postgres", + "params": { + "host": "localhost", + "port": 5436, + "user": "myuser", + "password": "catsarecool", + "database": "animals", + "schema": "public", + "sampleRows": 3 + } + } + ] + ``` + + + +The only required settings are those for creating the database connection: `host`, `port`, `user`, `password`, and `database`. + +By default, the `schema` filter is set to `public`, and the `sampleRows` is set to 3. You may unset the schema if you want to include tables from all schemas. + +[Here is a short demo.](https://github.com/continuedev/continue/pull/859) + +### `@Google` + +Reference the results of a Google search. + + + + ```yaml title="Package or config.yaml" + context: + - uses: google + with: + serperApiKey: "" + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "google", + "params": { + "serperApiKey": "" + } + } + ] + ``` + + + +For example, type "@Google python tutorial" if you want to search and discuss ways of learning Python. + +Note: You can get an API key for free at [serper.dev](https://serper.dev). + +### `@Gitlab Merge Request` + +Reference an open MR for this branch on GitLab. + + + + ```yaml title="Package or config.yaml" + context: + - uses: gitlab-mr + with: + token: "..." + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "gitlab-mr", + "params": { + "token": "..." + } + } + ] + ``` + + + +You will need to create a [personal access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) with the `read_api` scope. + +#### Using Self-Hosted GitLab + +You can specify the domain to communicate with by setting the `domain` parameter in your configurtion. By default this is set to `gitlab.com`. + + + + ```yaml title="Package or config.yaml" + context: + - uses: gitlab-mr + with: + token: "..." + domain: "gitlab.example.com" + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "gitlab-mr", + "params": { + "token": "...", + "domain": "gitlab.example.com" + } + } + ] + ``` + + + +#### Filtering Comments + +If you select some code to be edited, you can have the context provider filter out comments for other files. To enable this feature, set `filterComments` to `true`. + +### `@Jira` + +Reference the conversation in a Jira issue. + + + + ```yaml title="Package or config.yaml" + context: + - uses: jira + with: + domain: company.atlassian.net + token: ATATT... + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "jira", + "params": { + "domain": "company.atlassian.net", + "token": "ATATT..." + } + } + ] + ``` + + + +Make sure to include your own [Atlassian API Token](https://id.atlassian.com/manage-profile/security/api-tokens), or use your `email` and `token`, with token set to your password for basic authentication. If you use your own Atlassian API Token, don't configure your email. + +#### Jira Datacenter Support + +This context provider supports both Jira API version 2 and 3. It will use version 3 by default since +that's what the cloud version uses, but if you have the datacenter version of Jira, you'll need +to set the API Version to 2 using the `apiVersion` property. + + + + ```yaml title="Package or config.yaml" + context: + - uses: jira + with: + apiVersion: "2" + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "jira", + "params": { + "apiVersion": "2" + } + } + ] + ``` + + + +#### Issue Query + +By default, the following query will be used to find issues: + +```jql +assignee = currentUser() AND resolution = Unresolved order by updated DESC +``` + +You can override this query by setting the `issueQuery` parameter. + +### `@Discord` + +Reference the messages in a Discord channel. + + + + ```yaml title="Package or config.yaml" + context: + - uses: discord + with: + discordKey: "bot token" + guildId: "1234567890" + channels: + - id: "123456" + name: "example-channel" + - id: "678901" + name: "example-channel-2" + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "discord", + "params": { + "discordKey": "bot token", + "guildId": "1234567890", + "channels": [ + { + "id": "123456", + "name": "example-channel" + }, + { + "id": "678901", + "name": "example-channel-2" + } + ] + } + } + ] + ``` + + + +Make sure to include your own [Bot Token](https://discord.com/developers/applications), and join it to your related server . If you want more granular control over which channels are searched, you can specify a list of channel IDs to search in. If you don't want to specify any channels, just include the guild id(Server ID) and all channels will be included. The provider only reads text channels. + +### `@HTTP` + +The HttpContextProvider makes a POST request to the url passed in the configuration. The server must return 200 OK with a ContextItem object or an array of ContextItems. + + + + ```yaml title="Package or config.yaml" + context: + - uses: http + with: + url: "https://api.example.com/v1/users" + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "http", + "params": { + "url": "https://api.example.com/v1/users" + } + } + ] + ``` + + + +The receiving URL should expect to receive the following parameters: + +```js title="POST parameters" +{ + query: string, + fullInput: string +} +``` + +The response 200 OK should be a JSON object with the following structure: + +```json title="Response" +[ + { + "name": "", + "description": "", + "content": "" + } +] + +// OR +{ + "name": "", + "description": "", + "content": "" +} +``` + +### `@Commits` + +Reference specific git commit metadata and diff or all of the recent commits. + + + + ```yaml title="Package or config.yaml" + context: + - uses: commit + with: + Depth: 50 + LastXCommitsDepth: 10 + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "commit", + "params": { + "Depth": 50, + "LastXCommitsDepth": 10 + } + } + ] + ``` + + + +The depth is how many commits will be loaded into the submenu, defaults to 50. +The LastXCommitsDepth is how many recent commits will be included, defaults to 10. + +### `@Greptile` + +Query a [Greptile](https://www.greptile.com/) index of the current repo/branch. + + + + ```yaml title="Package or config.yaml" + context: + - uses: greptile + with: + greptileToken: "..." + githubToken: "..." + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "greptile", + "params": { + "GreptileToken": "...", + "GithubToken": "..." + } + } + ] + ``` + + + +### Requesting Context Providers + +Not seeing what you want? Create an issue [here](https://github.com/continuedev/continue/issues/new?assignees=TyDunn&labels=enhancement&projects=&template=feature-request-%F0%9F%92%AA.md&title=) to request a new Context Provider. diff --git a/docs/docs/customize/deep-dives/autocomplete.md b/docs/docs/customize/deep-dives/autocomplete.mdx similarity index 79% rename from docs/docs/customize/deep-dives/autocomplete.md rename to docs/docs/customize/deep-dives/autocomplete.mdx index 43c096669..5dba5d800 100644 --- a/docs/docs/customize/deep-dives/autocomplete.md +++ b/docs/docs/customize/deep-dives/autocomplete.mdx @@ -3,20 +3,38 @@ title: Autocomplete keywords: [autocomplete] --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + ### Setting up with Codestral (recommended) If you want to have the best autocomplete experience, we recommend using Codestral, which is available through the [Mistral API](https://console.mistral.ai/). To do this, obtain an API key and add it to your `config.json`: -```json title="config.json (Deprecated)" -{ - "tabAutocompleteModel": { - "title": "Codestral", - "provider": "mistral", - "model": "codestral-latest", - "apiKey": "YOUR_API_KEY" + + + ```yaml title="config.yaml" + models: + - name: Codestral + provider: mistral + model: codestral-latest + apiKeySecret: CODESTRAL_API_KEY + roles: + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" + { + "tabAutocompleteModel": { + "title": "Codestral", + "provider": "mistral", + "model": "codestral-latest", + "apiKey": "YOUR_API_KEY" + } } -} -``` + ``` + + ### Setting up with Ollama (default) @@ -32,17 +50,29 @@ Once it has been downloaded, you should begin to see completions in VS Code. All of the configuration options available for chat models are available to use for tab-autocomplete. For example, if you wanted to use a remote Ollama instance you would edit your `config.json` like this (note that it is not inside the models array): -```json title="config.json (Deprecated)" -{ + + + ```yaml title="config.yaml" + models: + - name: Tab Autocomplete Model + provider: ollama + model: qwen2.5-coder:1.5b-base + apiBase: https:// + roles: + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" "tabAutocompleteModel": { - "title": "Tab Autocomplete Model", - "provider": "ollama", - "model": "qwen2.5-coder:1.5b-base", - "apiBase": "https://" - }, - ... -} -``` + "title": "Tab Autocomplete Model", + "provider": "ollama", + "model": "qwen2.5-coder:1.5b-base", + "apiBase": "https://" + } + ``` + + If you aren't yet familiar with the available options, you can find the full reference [here](./configuration.md). @@ -71,21 +101,36 @@ This object allows you to customize the behavior of tab-autocomplete. The availa ### Full example -```json title="config.json (Deprecated)" -{ - "tabAutocompleteModel": { - "title": "Tab Autocomplete Model", - "provider": "ollama", - "model": "qwen2.5-coder:1.5b-base", - "apiBase": "https://" - }, - "tabAutocompleteOptions": { - "debounceDelay": 500, - "maxPromptTokens": 1500, - "disableInFiles": ["*.md"] + + + ```yaml title="config.yaml" + models: + - name: Tab Autocomplete Model + provider: ollama + model: qwen2.5-coder:1.5b-base + apiBase: https:// + roles: + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" + { + "tabAutocompleteModel": { + "title": "Tab Autocomplete Model", + "provider": "ollama", + "model": "qwen2.5-coder:1.5b-base", + "apiBase": "https://" + }, + "tabAutocompleteOptions": { + "debounceDelay": 500, + "maxPromptTokens": 1500, + "disableInFiles": ["*.md"] + } } -} -``` + ``` + + ## FAQs diff --git a/docs/docs/customize/deep-dives/codebase.md b/docs/docs/customize/deep-dives/codebase.mdx similarity index 81% rename from docs/docs/customize/deep-dives/codebase.md rename to docs/docs/customize/deep-dives/codebase.mdx index a5a06644f..994cb848d 100644 --- a/docs/docs/customize/deep-dives/codebase.md +++ b/docs/docs/customize/deep-dives/codebase.mdx @@ -3,6 +3,9 @@ description: Talk to your codebase keywords: [talk, embeddings, reranker, codebase, experimental] --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # @Codebase Continue indexes your codebase so that it can later automatically pull in the most relevant context from throughout your workspace. This is done via a combination of embeddings-based retrieval and keyword search. By default, all embeddings are calculated locally using `transformers.js` and stored locally in `~/.continue/index`. @@ -40,20 +43,32 @@ Here are use cases where it is not useful: There are a few options that let you configure the behavior of the codebase context provider. These can be set in `config.json`, and are the same for the codebase, docs, and folder context providers: -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "codebase", - "params": { - "nRetrieve": 25, - "nFinal": 5, - "useReranking": true + + + ```yaml title="Package or config.yaml" + context: + - uses: codebase + with: + nRetrieve: 25, + nFinal: 5, + useReranking: true + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "codebase", + "params": { + "nRetrieve": 25, + "nFinal": 5, + "useReranking": true + } } - } - ] -} -``` + ] + ``` + + ### `nRetrieve` @@ -79,4 +94,4 @@ If you need to force a refresh of the index, reload the VS Code window with If you run into the following error when connecting to the new Claude 3.5 Sonnet 2 models from AWS - `400 Invocation of model ID anthropic.claude-3-5-sonnet-20241022-v2:0 with on-demand throughput isn’t supported. Retry your request with the ID or ARN of an inference profile that contains this model.` - -> You can fix this using the following config.json - -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Claude 3.5 Sonnet", - "provider": "bedrock", - "model": "us.anthropic.claude-3-5-sonnet-20241022-v2:0", - "region": "us-east-1", - "profile": "bedrock" - } - ] -} -``` - -## Autocomplete model - -Bedrock currently does not offer any autocomplete models. - -[Click here](../../model-types/autocomplete.md) to see a list of autocomplete model providers. - -## Embeddings model - -We recommend configuring [`amazon.titan-embed-text-v2:0`](https://docs.aws.amazon.com/bedrock/latest/devguide/models.html#amazon.titan-embed-text-v2-0) as your embeddings model. - -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "title": "Embeddings Model", - "provider": "bedrock", - "model": "amazon.titan-embed-text-v2:0", - "region": "us-west-2" - } -} -``` - -## Reranking model - -We recommend configuring `cohere.rerank-v3-5:0` as your reranking model, you may also use `amazon.rerank-v1:0`. - -```json title="config.json (Deprecated)" -{ - "reranker": { - "name": "bedrock", - "params": { - "model": "cohere.rerank-v3-5:0", - "region": "us-west-2" - } - } -} -``` - -## Authentication - -Authentication will be through temporary or long-term credentials in -`~/.aws/credentials` under a configured profile (e.g. "bedrock"). - -```title="~/.aws/credentials -[bedrock] -aws_access_key_id = abcdefg -aws_secret_access_key = hijklmno -aws_session_token = pqrstuvwxyz # Optional: means short term creds. -``` - -## Custom Imported Models - -To setup Bedrock using custom imported models, add the following to your `config.json` file: - -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "AWS Bedrock deepseek-coder-6.7b-instruct", - "provider": "bedrockimport", - "model": "deepseek-coder-6.7b-instruct", - "modelArn": "arn:aws:bedrock:us-west-2:XXXXX:imported-model/XXXXXX", - "region": "us-west-2", - "profile": "bedrock" - } - ] -} -``` - -Authentication will be through temporary or long-term credentials in -~/.aws/credentials under a configured profile (e.g. "bedrock"). - -```title="~/.aws/credentials -[bedrock] -aws_access_key_id = abcdefg -aws_secret_access_key = hijklmno -aws_session_token = pqrstuvwxyz # Optional: means short term creds. -``` diff --git a/docs/docs/customize/model-providers/top-level/bedrock.mdx b/docs/docs/customize/model-providers/top-level/bedrock.mdx new file mode 100644 index 000000000..cf6edf0e4 --- /dev/null +++ b/docs/docs/customize/model-providers/top-level/bedrock.mdx @@ -0,0 +1,192 @@ +--- +title: Amazon Bedrock +slug: ../bedrock +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +Amazon Bedrock is a fully managed service on AWS that provides access to foundation models from various AI companies through a single API. + +## Chat model + +We recommend configuring **Claude 3.5 Sonnet** as your chat model. + + + + ```yaml title="config.yaml" + models: + - name: Claude 3.5 Sonnet + provider: bedrock + model: anthropic.claude-3-5-sonnet-20240620-v1:0 + region: us-east-1 + profile: bedrock + roles: + - chat + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Claude 3.5 Sonnet", + "provider": "bedrock", + "model": "anthropic.claude-3-5-sonnet-20240620-v1:0", + "region": "us-east-1", + "profile": "bedrock" + } + ] + ``` + + + +> If you run into the following error when connecting to the new Claude 3.5 Sonnet 2 models from AWS - `400 Invocation of model ID anthropic.claude-3-5-sonnet-20241022-v2:0 with on-demand throughput isn't supported. Retry your request with the ID or ARN of an inference profile that contains this model.` + +> You can fix this using the following config: + + + + ```yaml title="config.yaml" + models: + - name: Claude 3.5 Sonnet + provider: bedrock + model: us.anthropic.claude-3-5-sonnet-20241022-v2:0 + region: us-east-1 + profile: bedrock + roles: + - chat + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Claude 3.5 Sonnet", + "provider": "bedrock", + "model": "us.anthropic.claude-3-5-sonnet-20241022-v2:0", + "region": "us-east-1", + "profile": "bedrock" + } + ] + ``` + + + +## Autocomplete model + +Bedrock currently does not offer any autocomplete models. + +[Click here](../../model-types/autocomplete.md) to see a list of autocomplete model providers. + +## Embeddings model + +We recommend configuring [`amazon.titan-embed-text-v2:0`](https://docs.aws.amazon.com/bedrock/latest/devguide/models.html#amazon.titan-embed-text-v2-0) as your embeddings model. + + + + ```yaml title="config.yaml" + models: + - name: Embeddings Model + provider: bedrock + model: amazon.titan-embed-text-v2:0 + region: us-west-2 + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "title": "Embeddings Model", + "provider": "bedrock", + "model": "amazon.titan-embed-text-v2:0", + "region": "us-west-2" + } + ``` + + + +## Reranking model + +We recommend configuring `cohere.rerank-v3-5:0` as your reranking model, you may also use `amazon.rerank-v1:0`. + + + + ```yaml title="config.yaml" + models: + - name: Bedrock Reranker + provider: bedrock + model: cohere.rerank-v3-5:0 + region: us-west-2 + roles: + - rerank + ``` + + + ```json title="config.json (Deprecated)" + "reranker": { + "name": "bedrock", + "params": { + "model": "cohere.rerank-v3-5:0", + "region": "us-west-2" + } + } + ``` + + + +## Authentication + +Authentication will be through temporary or long-term credentials in +`~/.aws/credentials` under a configured profile (e.g. "bedrock"). + +```title="~/.aws/credentials +[bedrock] +aws_access_key_id = abcdefg +aws_secret_access_key = hijklmno +aws_session_token = pqrstuvwxyz # Optional: means short term creds. +``` + +## Custom Imported Models + +To setup Bedrock using custom imported models, add the following to your config file: + + + + ```yaml title="config.yaml" + models: + - name: AWS Bedrock deepseek-coder-6.7b-instruct + provider: bedrockimport + model: deepseek-coder-6.7b-instruct + modelArn: arn:aws:bedrock:us-west-2:XXXXX:imported-model/XXXXXX + region: us-west-2 + profile: bedrock + roles: + - chat + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "AWS Bedrock deepseek-coder-6.7b-instruct", + "provider": "bedrockimport", + "model": "deepseek-coder-6.7b-instruct", + "modelArn": "arn:aws:bedrock:us-west-2:XXXXX:imported-model/XXXXXX", + "region": "us-west-2", + "profile": "bedrock" + } + ] + ``` + + + +Authentication will be through temporary or long-term credentials in +~/.aws/credentials under a configured profile (e.g. "bedrock"). + +```title="~/.aws/credentials +[bedrock] +aws_access_key_id = abcdefg +aws_secret_access_key = hijklmno +aws_session_token = pqrstuvwxyz # Optional: means short term creds. +``` diff --git a/docs/docs/customize/model-providers/top-level/deepseek.md b/docs/docs/customize/model-providers/top-level/deepseek.mdx similarity index 100% rename from docs/docs/customize/model-providers/top-level/deepseek.md rename to docs/docs/customize/model-providers/top-level/deepseek.mdx diff --git a/docs/docs/customize/model-providers/top-level/gemini.md b/docs/docs/customize/model-providers/top-level/gemini.md deleted file mode 100644 index 9b6247484..000000000 --- a/docs/docs/customize/model-providers/top-level/gemini.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: Gemini -slug: ../gemini ---- - -:::info - -You can get an API key from the [Google AI Studio](https://aistudio.google.com/). - -::: - -## Chat model - -We recommend configuring **Gemini 1.5 Pro** as your chat model. - -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Gemini 1.5 Pro", - "provider": "gemini", - "model": "gemini-1.5-pro-latest", - "apiKey": "[API_KEY]" - } - ] -} -``` - -## Autocomplete model - -Gemini currently does not offer any autocomplete models. - -[Click here](../../model-types/autocomplete.md) to see a list of autocomplete model providers. - -## Embeddings model - -We recommend configuring **text-embedding-004** as your embeddings model. - -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "provider": "gemini", - "model": "models/text-embedding-004", - "apiKey": "[API_KEY]" - } -} -``` - -## Reranking model - -Gemini currently does not offer any reranking models. - -[Click here](../../model-types/reranking.md) to see a list of reranking model providers. diff --git a/docs/docs/customize/model-providers/top-level/gemini.mdx b/docs/docs/customize/model-providers/top-level/gemini.mdx new file mode 100644 index 000000000..490c00996 --- /dev/null +++ b/docs/docs/customize/model-providers/top-level/gemini.mdx @@ -0,0 +1,80 @@ +--- +title: Gemini +slug: ../gemini +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +:::info +You can get an API key from the [Google AI Studio](https://aistudio.google.com/). +::: + +## Chat model + +We recommend configuring **Gemini 1.5 Pro** as your chat model. + + + + ```yaml title="config.yaml" + models: + - name: Gemini 1.5 Pro + provider: gemini + model: gemini-1.5-pro-latest + apiKey: "[API_KEY]" + roles: + - chat + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Gemini 1.5 Pro", + "provider": "gemini", + "model": "gemini-1.5-pro-latest", + "apiKey": "[API_KEY]" + } + ] + ``` + + + +## Autocomplete model + +Gemini currently does not offer any autocomplete models. + +[Click here](../../model-types/autocomplete.md) to see a list of autocomplete model providers. + +## Embeddings model + +We recommend configuring **text-embedding-004** as your embeddings model. + + + + ```yaml title="config.yaml" + models: + - name: Gemini Embeddings + provider: gemini + model: models/text-embedding-004 + apiKey: "[API_KEY]" + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "provider": "gemini", + "model": "models/text-embedding-004", + "apiKey": "[API_KEY]" + } + ``` + + + +## Reranking model + +Gemini currently does not offer any reranking models. + +[Click here](../../model-types/reranking.md) to see a list of reranking model providers. diff --git a/docs/docs/customize/model-providers/top-level/mistral.md b/docs/docs/customize/model-providers/top-level/mistral.md deleted file mode 100644 index 67ba28b3e..000000000 --- a/docs/docs/customize/model-providers/top-level/mistral.md +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: Mistral -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). 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`. - -::: - -## Chat model - -We recommend configuring **Mistral Large** as your chat model. - -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Mistral Large", - "provider": "mistral", - "model": "mistral-large-latest", - "apiKey": "[API_KEY]" - } - ] -} -``` - -## Autocomplete model - -We recommend configuring **Codestral** as your autocomplete model. - -```json title="config.json (Deprecated)" -{ - "tabAutocompleteModel": { - "title": "Codestral", - "provider": "mistral", - "model": "codestral-latest" - // "apiBase": "https://codestral.mistral.ai/v1" // Do this if you are using a Codestral API key - } -} -``` - -## Embeddings model - -We recommend configuring **Mistral Embed** as your embeddings model. - -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "provider": "mistral", - "model": "mistral-embed", - "apiKey": "[API_KEY]", - "apiBase": "https://api.mistral.ai/v1" - } -} -``` - -## Reranking model - -Mistral currently does not offer any reranking models. - -[Click here](../../model-types/reranking.md) to see a list of reranking model providers. diff --git a/docs/docs/customize/model-providers/top-level/mistral.mdx b/docs/docs/customize/model-providers/top-level/mistral.mdx new file mode 100644 index 000000000..158b8169f --- /dev/null +++ b/docs/docs/customize/model-providers/top-level/mistral.mdx @@ -0,0 +1,104 @@ +--- +title: Mistral +slug: ../mistral +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +:::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). 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`. +::: + +## Chat model + +We recommend configuring **Mistral Large** as your chat model. + + + + ```yaml title="config.yaml" + models: + - name: Mistral Large + provider: mistral + model: mistral-large-latest + apiKeySecret: MISTRAL_API_KEY + roles: + - chat + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Mistral Large", + "provider": "mistral", + "model": "mistral-large-latest", + "apiKey": "[API_KEY]" + } + ] + ``` + + + +## Autocomplete model + +We recommend configuring **Codestral** as your autocomplete model. + + + + ```yaml title="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 + ``` + + + ```json title="config.json (Deprecated)" + "tabAutocompleteModel": { + "title": "Codestral", + "provider": "mistral", + "model": "codestral-latest" + // "apiBase": "https://codestral.mistral.ai/v1" // Do this if you are using a Codestral API key + } + ``` + + + +## Embeddings model + +We recommend configuring **Mistral Embed** as your embeddings model. + + + + ```yaml title="config.yaml" + models: + - name: Mistral Embed + provider: mistral + model: mistral-embed + apiKeySecret: MISTRAL_API_KEY + apiBase: https://api.mistral.ai/v1 + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "provider": "mistral", + "model": "mistral-embed", + "apiKey": "[API_KEY]", + "apiBase": "https://api.mistral.ai/v1" + } + ``` + + + +## Reranking model + +Mistral currently does not offer any reranking models. + +[Click here](../../model-types/reranking.md) to see a list of reranking model providers. diff --git a/docs/docs/customize/model-providers/top-level/ollama.md b/docs/docs/customize/model-providers/top-level/ollama.md deleted file mode 100644 index f2229c3b6..000000000 --- a/docs/docs/customize/model-providers/top-level/ollama.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: Ollama -slug: ../ollama ---- - -Ollama is an open-source tool that allows to run large language models (LLMs) locally on their own computers. To use Ollama, you can install it [here](https://ollama.ai/download) and download the model you want to run with the `ollama run` command. - -## Chat model - -We recommend configuring **Llama3.1 8B** as your chat model. - -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Llama3.1 8B", - "provider": "ollama", - "model": "llama3.1:8b" - } - ] -} -``` - -## Autocomplete model - -We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model. - -```json title="config.json (Deprecated)" -{ - "tabAutocompleteModel": { - "title": "Qwen2.5-Coder 1.5B", - "provider": "ollama", - "model": "qwen2.5-coder:1.5b-base" - } -} -``` - -## Embeddings model - -We recommend configuring **Nomic Embed Text** as your embeddings model. - -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "provider": "ollama", - "model": "nomic-embed-text" - } -} -``` - -## Reranking model - -Ollama currently does not offer any reranking models. - -[Click here](../../model-types/reranking.md) to see a list of reranking model providers. - -## Using a remote instance - -To configure a remote instance of Ollama, add the `"apiBase"` property to your model in config.json: - -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Llama3.1 8B", - "provider": "ollama", - "model": "llama3.1:8b", - "apiBase": "http://:11434" - } - ] -} -``` diff --git a/docs/docs/customize/model-providers/top-level/ollama.mdx b/docs/docs/customize/model-providers/top-level/ollama.mdx new file mode 100644 index 000000000..6052372f0 --- /dev/null +++ b/docs/docs/customize/model-providers/top-level/ollama.mdx @@ -0,0 +1,120 @@ +--- +title: Ollama +slug: ../ollama +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +Ollama is an open-source tool that allows to run large language models (LLMs) locally on their own computers. To use Ollama, you can install it [here](https://ollama.ai/download) and download the model you want to run with the `ollama run` command. + +## Chat model + +We recommend configuring **Llama3.1 8B** as your chat model. + + + + ```yaml title="Package or config.yaml" + models: + - name: Llama3.1 8B + provider: ollama + model: llama3.1:8b + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama3.1 8B", + "provider": "ollama", + "model": "llama3.1:8b" + } + ] + ``` + + + +## Autocomplete model + +We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model. + + + + ```yaml title="Package or config.yaml" + models: + - name: Qwen2.5-Coder 1.5B + provider: ollama + model: qwen2.5-coder:1.5b-base + roles: + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" + "tabAutocompleteModel": { + "title": "Qwen2.5-Coder 1.5B", + "provider": "ollama", + "model": "qwen2.5-coder:1.5b-base" + } + ``` + + + +## Embeddings model + +We recommend configuring **Nomic Embed Text** as your embeddings model. + + + + ```yaml title="Package or config.yaml" + models: + - name: Nomic Embed Text + provider: ollama + model: nomic-embed-text + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "provider": "ollama", + "model": "nomic-embed-text" + } + ``` + + + +## Reranking model + +Ollama currently does not offer any reranking models. + +[Click here](../../model-types/reranking.md) to see a list of reranking model providers. + +## Using a remote instance + +To configure a remote instance of Ollama, add the `"apiBase"` property to your model in config.json: + + + + ```yaml title="Package or config.yaml" + models: + - title: Llama3.1 8B + provider: ollama + model: llama3.1:8b + apiBase: http://:11434 + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama3.1 8B", + "provider": "ollama", + "model": "llama3.1:8b", + "apiBase": "http://:11434" + } + ] + ``` + + diff --git a/docs/docs/customize/model-providers/top-level/openai.md b/docs/docs/customize/model-providers/top-level/openai.md deleted file mode 100644 index d59fe1f6a..000000000 --- a/docs/docs/customize/model-providers/top-level/openai.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -title: OpenAI -slug: ../openai ---- - -:::info - -You can get an API key from the [OpenAI console](https://platform.openai.com/account/api-keys) - -::: - -## Chat model - -We recommend configuring **GPT-4o** as your chat model. - -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "GPT-4o", - "provider": "openai", - "model": "gpt-4o", - "apiKey": "[API_KEY]" - } - ] -} -``` - -## Autocomplete model - -OpenAI currently does not offer any autocomplete models. - -[Click here](../../model-types/autocomplete.md) to see a list of autocomplete model providers. - -## Embeddings model - -We recommend configuring **text-embedding-3-large** as your embeddings model. - -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "provider": "openai", - "model": "text-embedding-3-large", - "apiKey": "[API_KEY]" - } -} -``` - -## Reranking model - -OpenAI currently does not offer any reranking models. - -[Click here](../../model-types/reranking.md) to see a list of reranking model providers. - -## OpenAI compatible servers / APIs - -OpenAI compatible servers - -- [KoboldCpp](https://github.com/lostruins/koboldcpp) -- [text-gen-webui](https://github.com/oobabooga/text-generation-webui/tree/main/extensions/openai#setup--installation) -- [FastChat](https://github.com/lm-sys/FastChat/blob/main/docs/openai_api.md) -- [LocalAI](https://localai.io/basics/getting_started/) -- [llama-cpp-python](https://github.com/abetlen/llama-cpp-python#web-server) -- [TensorRT-LLM](https://github.com/NVIDIA/trt-llm-as-openai-windows?tab=readme-ov-file#examples) -- [vLLM](https://docs.vllm.ai/en/latest/serving/openai_compatible_server.html) -- [BerriAI/litellm](https://github.com/BerriAI/litellm) - -OpenAI compatible APIs - -- [Anyscale Endpoints](https://github.com/continuedev/deploy-os-code-llm#others) -- [Anyscale Private Endpoints](https://github.com/continuedev/deploy-os-code-llm#anyscale-private-endpoints) - -If you are using an OpenAI compatible server / API, you can change the `apiBase` like this: - -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "OpenAI-compatible server / API", - "provider": "openai", - "model": "MODEL_NAME", - "apiKey": "EMPTY", - "apiBase": "http://localhost:8000/v1" - } - ] -} -``` - -To force usage of `chat/completions` instead of `completions` endpoint you can set: - -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "OpenAI-compatible server / API", - "provider": "openai", - "model": "MODEL_NAME", - "apiBase": "http://localhost:8000/v1", - "useLegacyCompletionsEndpoint": true - } - ] -} -``` diff --git a/docs/docs/customize/model-providers/top-level/openai.mdx b/docs/docs/customize/model-providers/top-level/openai.mdx new file mode 100644 index 000000000..c4338e036 --- /dev/null +++ b/docs/docs/customize/model-providers/top-level/openai.mdx @@ -0,0 +1,160 @@ +--- +title: OpenAI +slug: ../openai +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +:::info +You can get an API key from the [OpenAI console](https://platform.openai.com/account/api-keys) +::: + +## Chat model + +We recommend configuring **GPT-4o** as your chat model. + + + + ```yaml title="config.yaml" + models: + - name: GPT-4o + provider: openai + model: gpt-4o + apiKeySecret: OPENAI_KEY + ``` + + + ```json title="config.json (Deprecated)" + { + "models": [ + { + "title": "GPT-4o", + "provider": "openai", + "model": "gpt-4o", + "apiKey": "[API_KEY]" + } + ] + } + ``` + + + +## Autocomplete model + +OpenAI currently does not offer any autocomplete models. + +[Click here](../../model-types/autocomplete.md) to see a list of autocomplete model providers. + +## Embeddings model + +We recommend configuring **text-embedding-3-large** as your embeddings model. + + + + ```yaml title="config.yaml" + models: + - name: OpenAI Embeddings + provider: openai + model: text-embedding-3-large + apiKey: + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + { + "embeddingsProvider": { + "provider": "openai", + "model": "text-embedding-3-large", + "apiKey": "[API_KEY]" + } + } + ``` + + + +## Reranking model + +OpenAI currently does not offer any reranking models. + +[Click here](../../model-types/reranking.md) to see a list of reranking model providers. + +## OpenAI compatible servers / APIs + +OpenAI compatible servers + +- [KoboldCpp](https://github.com/lostruins/koboldcpp) +- [text-gen-webui](https://github.com/oobabooga/text-generation-webui/tree/main/extensions/openai#setup--installation) +- [FastChat](https://github.com/lm-sys/FastChat/blob/main/docs/openai_api.md) +- [LocalAI](https://localai.io/basics/getting_started/) +- [llama-cpp-python](https://github.com/abetlen/llama-cpp-python#web-server) +- [TensorRT-LLM](https://github.com/NVIDIA/trt-llm-as-openai-windows?tab=readme-ov-file#examples) +- [vLLM](https://docs.vllm.ai/en/latest/serving/openai_compatible_server.html) +- [BerriAI/litellm](https://github.com/BerriAI/litellm) + +OpenAI compatible APIs + +- [Anyscale Endpoints](https://github.com/continuedev/deploy-os-code-llm#others) +- [Anyscale Private Endpoints](https://github.com/continuedev/deploy-os-code-llm#anyscale-private-endpoints) + +If you are using an OpenAI compatible server / API, you can change the `apiBase` like this: + + + + ```yaml title="config.yaml" + models: + - name: OpenAI-compatible server / API + provider: openai + model: MODEL_NAME + apiBase: http://localhost:8000/v1 + apiKeySecret: EMPTY + roles: + - chat + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "OpenAI-compatible server / API", + "provider": "openai", + "model": "MODEL_NAME", + "apiKey": "EMPTY", + "apiBase": "http://localhost:8000/v1" + } + ] + ``` + + + +To force usage of `chat/completions` instead of `completions` endpoint you can set: + + + + ```yaml title="config.yaml" + models: + - name: OpenAI-compatible server / API + provider: openai + model: MODEL_NAME + apiBase: http://localhost:8000/v1 + useLegacyCompletionsEndpoint: true + ``` + + + ```json title="config.json (Deprecated)" + { + "models": [ + { + "title": "OpenAI-compatible server / API", + "provider": "openai", + "model": "MODEL_NAME", + "apiBase": "http://localhost:8000/v1", + "useLegacyCompletionsEndpoint": true + } + ] + } + ``` + + diff --git a/docs/docs/customize/slash-commands.md b/docs/docs/customize/slash-commands.mdx similarity index 77% rename from docs/docs/customize/slash-commands.md rename to docs/docs/customize/slash-commands.mdx index 5afffdb77..79cede310 100644 --- a/docs/docs/customize/slash-commands.md +++ b/docs/docs/customize/slash-commands.mdx @@ -4,6 +4,13 @@ description: Shortcuts that can be activated by prefacing your input with '/' keywords: [slash command, custom commands, step] --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +:::info +Slash commands can currently only be added using [`config.json`](../json-reference.md), which has been deprecated in favor of the [`YAML Config Format`](../reference.md). We recommend looking into [Prompt Files](../customize/deep-dives//prompt-files.md) to achieve similar functionality. +::: + Slash commands are shortcuts that can be activated by typing '/' and selecting from the dropdown. For example, the built-in '/edit' slash command lets you stream edits directly into your editor. ![slash-commands](/img/slash-commands.png) @@ -109,23 +116,36 @@ The onboard slash command helps to familiarize yourself with a new project by an ### Model Context Protocol -The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a standard proposed by Anthropic to unify prompts, context, and tool use. Continue supports MCP "prompts" by creating slash commands. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then configure your `config.json` like this: +The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a standard proposed by Anthropic to unify prompts, context, and tool use. Continue supports MCP "prompts" by creating slash commands. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then set up your configuration like this: -```json title="config.json (Deprecated)" -{ - "experimental": { - "modelContextProtocolServers": [ - { - "transport": { - "type": "stdio", - "command": "uvx", - "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"] + + + ```yaml title="Package or config.yaml" + mcpServers: + - name: My MCP Server + command: uvx + args: + - mcp-server-sqlite + - --db-path + - /Users/NAME/test.db + ``` + + + ```json title="config.json (Deprecated)" + "experimental": { + "modelContextProtocolServers": [ + { + "transport": { + "type": "stdio", + "command": "uvx", + "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"] + } } - } - ] - } -} -``` + ] + } + ``` + + ### Build your own Slash Command diff --git a/docs/docs/customize/tools.md b/docs/docs/customize/tools.mdx similarity index 67% rename from docs/docs/customize/tools.md rename to docs/docs/customize/tools.mdx index 9047f50ff..8f94462b1 100644 --- a/docs/docs/customize/tools.md +++ b/docs/docs/customize/tools.mdx @@ -4,6 +4,9 @@ description: Tool use and customization keywords: [tool, use, function calling, claude, automatic] --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + Tools allow Continue to take action in your IDE and beyond (when you give permission). Currently, they are only supported for the following providers: - [Anthropic](./model-providers/top-level/anthropic.md) - see recommended models [here](https://docs.anthropic.com/en/docs/build-with-claude/tool-use#choosing-a-model). @@ -23,18 +26,31 @@ To let you balance speed and safety, each tool can be set to 1 of 3 modes: Currently custom tools can be configured using the [Model Context Protocol](https://modelcontextprotocol.io/introduction), a standard proposed by Anthropic to unify prompts, context, and tool use. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then configure your `config.json` like this: -```json title="config.json (Deprecated)" -{ - "experimental": { - "modelContextProtocolServers": [ - { - "transport": { - "type": "stdio", - "command": "uvx", - "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"] + + + ```yaml title="Package or config.yaml" + mcpServers: + - name: My MCP Server + command: uvx + args: + - mcp-server-sqlite + - --db-path + - /Users/NAME/test.db + ``` + + + ```json title="config.json (Deprecated)" + "experimental": { + "modelContextProtocolServers": [ + { + "transport": { + "type": "stdio", + "command": "uvx", + "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"] + } } - } - ] - } -} -``` + ] + } + ``` + + diff --git a/docs/docs/customize/tutorials/build-your-own-slash-command.md b/docs/docs/customize/tutorials/build-your-own-slash-command.md index 9c0c6f2d4..1692970fc 100644 --- a/docs/docs/customize/tutorials/build-your-own-slash-command.md +++ b/docs/docs/customize/tutorials/build-your-own-slash-command.md @@ -2,6 +2,10 @@ title: Build your own slash command --- +:::info +Slash commands can currently only be added using [`config.json`](../json-reference.md) or `config.ts`, which have been deprecated in favor of the [`YAML Config Format`](../reference.md). We recommend looking into [Prompt Files](../customize/deep-dives//prompt-files.md) to achieve similar functionality. +::: + There are two ways to add custom slash commands: 1. With natural language prompts - this is simpler and only requires writing a string or string template. @@ -19,9 +23,9 @@ Custom commands are great when you are frequently reusing a prompt. For example, ```json title="config.json (Deprecated)" customCommands=[{ - "name": "check", - "description": "Check for mistakes in my code", - "prompt": "{{{ input }}}\n\nPlease read the highlighted code and check for any mistakes. You should look for the following, and be extremely vigilant:\n- Syntax errors\n- Logic errors\n- Security vulnerabilities\n- Performance issues\n- Anything else that looks wrong\n\nOnce you find an error, please explain it as clearly as possible, but without using extra words. For example, instead of saying 'I think there is a syntax error on line 5', you should say 'Syntax error on line 5'. Give your answer as one bullet point per mistake found." + "name": "check", + "description": "Check for mistakes in my code", + "prompt": "{{{ input }}}\n\nPlease read the highlighted code and check for any mistakes. You should look for the following, and be extremely vigilant:\n- Syntax errors\n- Logic errors\n- Security vulnerabilities\n- Performance issues\n- Anything else that looks wrong\n\nOnce you find an error, please explain it as clearly as possible, but without using extra words. For example, instead of saying 'I think there is a syntax error on line 5', you should say 'Syntax error on line 5'. Give your answer as one bullet point per mistake found." }] ``` diff --git a/docs/docs/edit/model-setup.md b/docs/docs/edit/model-setup.md index ded10c2a4..64f5f69d6 100644 --- a/docs/docs/edit/model-setup.md +++ b/docs/docs/edit/model-setup.md @@ -7,4 +7,4 @@ keywords: [edit, cmd l, model] By default, Edit uses the [same model as Chat](chat/model-setup.mdx) since we recommend a similar, 400B+ parameter model or one of the frontier model for code edits. -You can configure a different model to be used for edits by updating your [`config.json`](../reference.md). +You can configure a different model to be used for edits by updating your [configuration](../reference.md). diff --git a/docs/docs/introduction.md b/docs/docs/introduction.md index 64f83436d..cfa1301cd 100644 --- a/docs/docs/introduction.md +++ b/docs/docs/introduction.md @@ -19,7 +19,7 @@ keywords: **Continue is the leading open-source AI code assistant inside of [VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) and [JetBrains](https://plugins.jetbrains.com/plugin/22707-continue-extension)** -- [Chat](chat/how-to-use-it.md) to understand and iterate on code in the sidebar -- [Autocomplete](autocomplete/how-to-use-it.md) to receive inline code suggestions as you type -- [Edit](edit/how-to-use-it.md) to modify code without leaving your current file -- [Actions](actions/how-to-use-it.md) to establish shortcuts for common use cases +- [Chat](chat/how-to-use-it) to understand and iterate on code in the sidebar +- [Autocomplete](autocomplete/how-to-use-it) to receive inline code suggestions as you type +- [Edit](edit/how-to-use-it) to modify code without leaving your current file +- [Actions](actions/how-to-use-it) to establish shortcuts for common use cases diff --git a/docs/docs/json-reference.md b/docs/docs/json-reference.md new file mode 100644 index 000000000..4faceb9a9 --- /dev/null +++ b/docs/docs/json-reference.md @@ -0,0 +1,451 @@ +--- +title: config.json Reference +description: Reference for the Continue _config.json_ configuration file +keywords: [config, config_schema.json, json] +--- + +:::info +`config.json` has been deprecated in favor of the [`YAML Config Format`](./yaml-reference). See the [migration guide](./yaml-migration). +::: + +Below are details for each property that can be set in `config.json`. The config schema code is found in [`extensions/vscode/config_schema.json`](https://github.com/continuedev/continue/blob/main/extensions/vscode/config_schema.json). + +**All properties at all levels are optional unless explicitly marked required** + +### `models` + +Your **chat** models are defined here, which are used for [Chat](./chat/how-to-use-it), [Edit](./edit/how-to-use-it), and [Actions](./actions/how-to-use-it). +Each model has specific configuration options tailored to its provider and functionality, which can be seen as suggestions while editing the json. + +**Properties:** + +- `title` (**required**): The title to assign to your model, shown in dropdowns, etc. +- `provider` (**required**): The provider of the model, which determines the type and interaction method. Options inclued `openai`, `ollama`, etc., see intelliJ suggestions. +- `model` (**required**): The name of the model, used for prompt template auto-detection. Use `AUTODETECT` special name to get all available models. +- `apiKey`: API key required by providers like OpenAI, Anthropic, and Cohere. +- `apiBase`: The base URL of the LLM API. +- `contextLength`: Maximum context length of the model, typically in tokens (default: 2048). +- `maxStopWords`: Maximum number of stop words allowed, to avoid API errors with extensive lists. +- `template`: Chat template to format messages. Auto-detected for most models but can be overridden. See intelliJ suggestions. +- `promptTemplates`: A mapping of prompt template names (e.g., `edit`) to template strings. [Customization Guide](https://docs.continue.dev/model-setup/configuration#customizing-the-edit-prompt). +- `completionOptions`: Model-specific completion options, same format as top-level [`completionOptions`](#completionoptions), which they override. +- `systemMessage`: A system message that will precede responses from the LLM. +- `requestOptions`: Model-specific HTTP request options, same format as top-level [`requestOptions`](#requestoptions), which they override. +- `apiType`: Specifies the type of API (`openai` or `azure`). +- `apiVersion`: Azure API version (e.g., `2023-07-01-preview`). +- `engine`: Engine for Azure OpenAI requests. +- `capabilities`: Override auto-detected capabilities: + - `uploadImage`: Boolean indicating if the model supports image uploads. + +_(AWS Only)_ + +- `profile`: AWS security profile for authorization. +- `modelArn`: AWS ARN for imported models (e.g., for `bedrockimport` provider). +- `region`: Region where the model is hosted (e.g., `us-east-1`, `eu-central-1`). + +Example: + +```json title="config.json" +{ + "models": [ + { + "title": "Ollama", + "provider": "ollama", + "model": "AUTODETECT" + }, + { + "model": "gpt-4o", + "contextLength": 128000, + "title": "GPT-4o", + "provider": "openai", + "apiKey": "YOUR_API_KEY" + } + ] +} +``` + +### `tabAutocompleteModel` + +Specifies the model or models for tab autocompletion, defaulting to an Ollama instance. This property uses the same format as `models`. Can be an array of models or an object for one model. + +Example + +```json title="config.json" +{ + "tabAutocompleteModel": { + "title": "My Starcoder", + "provider": "ollama", + "model": "starcoder2:3b" + } +} +``` + +### `tabAutocompleteOptions` + +Specifies options for tab autocompletion behavior. + +**Properties:** + +- `disable`: If `true`, disables tab autocomplete (default: `false`). +- `useFileSuffix`: If `true`, includes file suffix in the prompt. +- `maxPromptTokens`: Maximum number of tokens for the prompt. +- `debounceDelay`: Delay (in ms) before triggering autocomplete. +- `maxSuffixPercentage`: Maximum percentage of prompt for suffix. +- `prefixPercentage`: Percentage of input for prefix. +- `template`: Template string for autocomplete, using Mustache templating. You can use the `{{{ prefix }}}`, `{{{ suffix }}}`, `{{{ filename }}}`, `{{{ reponame }}}`, and `{{{ language }}}` variables. +- `multilineCompletions`: Controls multiline completions (`"always"`, `"never"`, or `"auto"`). +- `useCache`: If `true`, caches completions. +- `onlyMyCode`: If `true`, only includes code within the repository. +- `disableInFiles`: Array of glob patterns for files where autocomplete is disabled. + +Example + +```json title="config.json" +{ + "tabAutocompleteOptions": { + "debounceDelay": 500, + "maxPromptTokens": 1500, + "disableInFiles": ["*.md"] + } +} +``` + +### `embeddingsProvider` + +Embeddings model settings - the model used for @Codebase and @docs. + +**Properties:** + +- `provider` (**required**): Specifies the embeddings provider, with options including `transformers.js`, `ollama`, `openai`, `cohere`, `free-trial`, `gemini`, etc +- `model`: Model name for embeddings. +- `apiKey`: API key for the provider. +- `apiBase`: Base URL for API requests. +- `requestOptions`: Additional HTTP request settings specific to the embeddings provider. +- `maxChunkSize`: Maximum tokens per document chunk. Minimum is 128 tokens. +- `maxBatchSize`: Maximum number of chunks per request. Minimum is 1 chunk. + +(AWS ONLY) + +- `region`: Specifies the region hosting the model. +- `profile`: AWS security profile. + +Example: + +```json title="config.json" +{ + "embeddingsProvider": { + "provider": "openai", + "model": "text-embedding-ada-002", + "apiKey": "", + "maxChunkSize": 256, + "maxBatchSize": 5 + } +} +``` + +### `completionOptions` + +Parameters that control the behavior of text generation and completion settings. Top-level `completionOptions` apply to all models, _unless overridden at the model level_. + +**Properties:** + +- `stream`: Whether to stream the LLM response. Currently only respected by the `anthropic` and `ollama` providers; other providers will always stream (default: `true`). +- `temperature`: Controls the randomness of the completion. Higher values result in more diverse outputs. +- `topP`: The cumulative probability for nucleus sampling. Lower values limit responses to tokens within the top probability mass. +- `topK`: The maximum number of tokens considered at each step. Limits the generated text to tokens within this probability. +- `presencePenalty`: Discourages the model from generating tokens that have already appeared in the output. +- `frequencePenalty`: Penalizes tokens based on their frequency in the text, reducing repetition. +- `mirostat`: Enables Mirostat sampling, which controls the perplexity during text generation. Supported by Ollama, LM Studio, and llama.cpp providers (default: `0`, where `0` = disabled, `1` = Mirostat, and `2` = Mirostat 2.0). +- `stop`: An array of stop tokens that, when encountered, will terminate the completion. Allows specifying multiple end conditions. +- `maxTokens`: The maximum number of tokens to generate in a completion (default: `2048`). +- `numThreads`: The number of threads used during the generation process. Available only for Ollama as `num_thread`. +- `keepAlive`: For Ollama, this parameter sets the number of seconds to keep the model loaded after the last request, unloading it from memory if inactive (default: `1800` seconds, or 30 minutes). +- `useMmap`: For Ollama, this parameter allows the model to be mapped into memory. If disabled can enhance response time on low end devices but will slow down the stream. + +Example + +```json title="config.json" +{ + "completionOptions": { + "stream": false, + "temperature": 0.5 + } +} +``` + +### `requestOptions` + +Default HTTP request options that apply to all models and context providers, unless overridden at the model level. + +**Properties:** + +- `timeout`: Timeout for each request to the LLM (default: 7200 seconds). +- `verifySsl`: Whether to verify SSL certificates for requests. +- `caBundlePath`: Path to a custom CA bundle for HTTP requests - path to `.pem` file (or array of paths) +- `proxy`: Proxy URL to use for HTTP requests. +- `headers`: Custom headers for HTTP requests. +- `extraBodyProperties`: Additional properties to merge with the HTTP request body. +- `noProxy`: List of hostnames that should bypass the specified proxy. +- `clientCertificate`: Client certificate for HTTP requests. + + - `cert`: Path to the client certificate file. + - `key`: Path to the client certificate key file. + - `passphrase`: Optional passphrase for the client certificate key file. + +Example + +```json title="config.json" +{ + "requestOptions": { + "headers": { + "X-Auth-Token": "xxx" + } + } +} +``` + +### `reranker` + +Configuration for the reranker model used in response ranking. + +**Properties:** + +- `name` (**required**): Reranker name, e.g., `cohere`, `voyage`, `llm`, `free-trial`, `huggingface-tei`, `bedrock` +- `params`: + - `model`: Model name + - `apiKey`: Api key + - `region`: Region (for Bedrock only) + +Example + +```json title="config.json" +{ + "reranker": { + "name": "voyage", + "params": { + "model": "rerank-2", + "apiKey": "" + } + } +} +``` + +### `docs` + +List of documentation sites to index. + +**Properties:** + +- `title` (**required**): Title of the documentation site, displayed in dropdowns, etc. +- `startUrl` (**required**): Start page for crawling - usually root or intro page for docs +- `rootUrl`: Crawler will only index docs within this domain - pages that contain this URL +- `maxDepth`: Maximum depth for crawling. Default `3` +- `favicon`: URL for site favicon (default is `/favicon.ico` from `startUrl`). + +Example + +```json title="config.json" +"docs": [ + { + "title": "Continue", + "startUrl": "https://docs.continue.dev/intro", + "rootUrl": "https://docs.continue.dev", + "faviconUrl": "https://docs.continue.dev/favicon.ico", + } +] +``` + +### `slashCommands` + +Custom commands initiated by typing "/" in the sidebar. Commands include predefined functionality or may be user-defined. + +**Properties:** + +- `name`: The command name. Options include "issue", "share", "cmd", "http", "commit", and "review". +- `description`: Brief description of the command. +- `step`: Used for built-in commands; set the name for pre-configured options. +- `params`: Additional parameters to configure command behavior (command-specific - see code for command) + +Example: + +```json title="config.json" +{ + "slashCommands": [ + { + "name": "commit", + "description": "Generate a commit message" + }, + { + "name": "share", + "description": "Export this session as markdown" + }, + { + "name": "cmd", + "description": "Generate a shell command" + } + ] +} +``` + +### `customCommands` + +User-defined commands for prompt shortcuts in the sidebar, allowing quick access to common actions. + +**Properties:** + +- `name`: The name of the custom command. +- `prompt`: Text prompt for the command. +- `description`: Brief description explaining the command's function. + +Example: + +```json title="config.json" +{ + "customCommands": [ + { + "name": "test", + "prompt": "Write a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.", + "description": "Write unit tests for highlighted code" + } + ] +} +``` + +### `contextProviders` + +List of the pre-defined context providers that will show up as options while typing in the chat, and their customization with `params`. + +**Properties:** + +- `name`: Name of the context provider, e.g. `docs` or `web` +- `params`: A context-provider-specific record of params to configure the context behavior + +Example + +```json title="config.json" +{ + "contextProviders": [ + { + "name": "code", + "params": {} + }, + { + "name": "docs", + "params": {} + }, + { + "name": "diff", + "params": {} + }, + { + "name": "open", + "params": {} + } + ] +} +``` + +### `disableSessionTitles` + +Prevents generating summary titles for each chat session when set to `true`. + +### `ui` + +Customizable UI settings to control interface appearance and behavior. + +**Properties:** + +- `codeBlockToolbarPosition`: Sets the toolbar position within code blocks, either `top` (default) or `bottom`. +- `fontSize`: Specifies font size for UI elements. +- `displayRawMarkdown`: If `true`, shows raw markdown in responses. +- `showChatScrollbar`: If `true`, enables a scrollbar in the chat window. +- `codeWrap`: If `true`, enables text wrapping in code blocks. + +Example: + +```json title="config.json" +{ + "ui": { + "codeBlockToolbarPosition": "bottom", + "fontSize": 14, + "displayRawMarkdown": false, + "showChatScrollbar": false, + "codeWrap": false + } +} +``` + +### `allowAnonymousTelemetry` + +When `true`, anonymous usage data is collected using Posthog, to improve features. Default is `true`. + +### `userToken` + +An optional token that identifies the user, primarily for authenticated services. + +### `systemMessage` + +Defines a system message that appears before every response from the language model, providing guidance or context. + +### `disableIndexing` + +Prevents indexing of the codebase, useful primarily for debugging purposes. + +### `experimental` + +Several experimental config parameters are available, as described below: + +`experimental`: + +- `defaultContext`: Defines the default context for the LLM. Uses the same format as `contextProviders` but includes an additional `query` property to specify custom query parameters.= +- `modelRoles`: + - `inlineEdit`: Model title for inline edits. + - `applyCodeBlock`: Model title for applying code blocks. + - `repoMapFileSelection`: Model title for repo map selections. +- `readResponseTTS`: If `true`, reads LLM responses aloud with TTS. Default is `true`. +- `promptPath`: Change the path to custom prompt files from the default ".prompts" +- `quickActions`: Array of custom quick actions + - `title` (**required**): Display title for the quick action. + - `prompt` (**required**): Prompt for quick action. + - `sendToChat`: If `true`, sends result to chat; else inserts in document. Default is `false`. +- `contextMenuPrompts`: + - `comment`: Prompt for commenting code. + - `docstring`: Prompt for adding docstrings. + - `fix`: Prompt for fixing code. + - `optimize`: Prompt for optimizing code. +- `useChromiumForDocsCrawling`: Use Chromium to crawl docs locally. Useful if the default Cheerio crawler fails on sites that require JavaScript rendering. Downloads and installs Chromium to `~/.continue/.utils`.. +- `modelContextProtocolServers`: See [Model Context Protocol](/customize/context-providers#model-context-protocol) + +Example + +```json title="config.json" +{ + "experimental": { + "modelRoles": { + "inlineEdit": "Edit Model" + }, + "promptPath": "custom/.prompts", + "quickActions": [ + { + "title": "Tags", + "prompt": "Return a list of any function and class names from the included code block", + "sendToChat": true + } + ], + "contextMenuPrompts": { + "fixGrammar": "Fix grammar in the above but allow for typos." + }, + "readResponseTTS": false, + "useChromiumForDocsCrawling": true, + "modelContextProtocolServers": [ + { + "transport": { + "type": "stdio", + "command": "uvx", + "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"] + } + } + ] + } +} +``` diff --git a/docs/docs/reference.md b/docs/docs/reference.md index e0eca3902..3b86fb248 100644 --- a/docs/docs/reference.md +++ b/docs/docs/reference.md @@ -1,230 +1,175 @@ --- -title: config.json Reference -description: Reference for the Continue _config.json_ configuration file -keywords: [config, config_schema.json, json] +title: Config YAML Reference +description: Reference for the Continue configuration YAML file +keywords: [config, yaml, configuration, customize, customization] --- -Below are details for each property that can be set in `config.json`. The config schema code is found in [`extensions/vscode/config_schema.json`](https://github.com/continuedev/continue/blob/main/extensions/vscode/config_schema.json). +# Config YAML Reference -**All properties at all levels are optional unless explicitly marked required** + + +Continue can be configured using a YAML file `config.yaml` which for local configuration can be placed in your global `.continue` folder (`~/.continue` on Mac, `%USERPROFILE%\.continue`) + +Below are details for each property that can be set in `config.yaml`. + +:::info +Config YAML replaces `config.json`, which has been deprecated. View the **[Migration Guide](/yaml-migration)**. `config.yaml` currently only works in VS Code pre-release. +::: + +**All properties at all levels are optional unless explicitly marked as required.** + +## Properties + +The top-level properties in the `config.yaml` configuration file are: + +- [`name`](#name) (**required**) + +- [`version`](#version) (**required**) +- [`models`](#models) +- [`context`](#context) +- [`rules`](#rules) +- [`prompts`](#prompts) +- [`docs`](#docs) + + +- [`mcpServers`](#mcpservers) + +--- + +### `name` + +The `name` property specifies the name of your project or configuration. + +```yaml title="config.yaml" +name: MyProject +``` + +### `version` + +The `version` property specifies the version of your project or configuration. + +--- ### `models` -Your **chat** models are defined here, which are used for [Chat](./chat/how-to-use-it.md), [Edit](./edit/how-to-use-it.md), and [Actions](./actions/how-to-use-it.md). -Each model has specific configuration options tailored to its provider and functionality, which can be seen as suggestions while editing the json. +The `models` section defines the language models used in your configuration. Models are used for functionalities such as chat, editing, and summarizing. **Properties:** -- `title` (**required**): The title to assign to your model, shown in dropdowns, etc. -- `provider` (**required**): The provider of the model, which determines the type and interaction method. Options inclued `openai`, `ollama`, etc., see intelliJ suggestions. -- `model` (**required**): The name of the model, used for prompt template auto-detection. Use `AUTODETECT` special name to get all available models. -- `apiKey`: API key required by providers like OpenAI, Anthropic, and Cohere. -- `apiBase`: The base URL of the LLM API. -- `contextLength`: Maximum context length of the model, typically in tokens (default: 2048). -- `maxStopWords`: Maximum number of stop words allowed, to avoid API errors with extensive lists. -- `template`: Chat template to format messages. Auto-detected for most models but can be overridden. See intelliJ suggestions. -- `promptTemplates`: A mapping of prompt template names (e.g., `edit`) to template strings. [Customization Guide](https://docs.continue.dev/model-setup/configuration#customizing-the-edit-prompt). -- `completionOptions`: Model-specific completion options, same format as top-level [`completionOptions`](#completionoptions), which they override. -- `systemMessage`: A system message that will precede responses from the LLM. -- `requestOptions`: Model-specific HTTP request options, same format as top-level [`requestOptions`](#requestoptions), which they override. -- `apiType`: Specifies the type of API (`openai` or `azure`). -- `apiVersion`: Azure API version (e.g., `2023-07-01-preview`). -- `engine`: Engine for Azure OpenAI requests. -- `capabilities`: Override auto-detected capabilities: - - `uploadImage`: Boolean indicating if the model supports image uploads. +- `name` (**required**): A unique name to identify the model within your configuration. +- `provider` (**required**): The provider of the model (e.g., `openai`, `ollama`). +- `model` (**required**): The specific model name (e.g., `gpt-4`, `starcoder`). +- `roles`: An array specifying the roles this model can fulfill, such as `chat`, `autocomplete`, `embed`, `rerank`, `edit`, `apply`, `summarize`. +- `defaultCompletionOptions`: Default completion options for model settings. -_(AWS Only)_ + **Properties:** -- `profile`: AWS security profile for authorization. -- `modelArn`: AWS ARN for imported models (e.g., for `bedrockimport` provider). -- `region`: Region where the model is hosted (e.g., `us-east-1`, `eu-central-1`). + - `contextLength`: Maximum context length of the model, typically in tokens. + - `maxTokens`: Maximum number of tokens to generate in a completion. + - `temperature`: Controls the randomness of the completion. Values range from `0.0` (deterministic) to `1.0` (random). + - `topP`: The cumulative probability for nucleus sampling. + - `topK`: Maximum number of tokens considered at each step. + - `stop`: An array of stop tokens that will terminate the completion. + - `n`: Number of completions to generate. -Example: +- `requestOptions`: HTTP request options specific to the model. -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Ollama", - "provider": "ollama", - "model": "AUTODETECT" - }, - { - "model": "gpt-4o", - "contextLength": 128000, - "title": "GPT-4o", - "provider": "openai", - "apiKey": "YOUR_API_KEY" - } - ] -} + **Properties:** + + - `timeout`: Timeout for each request to the language model. + - `verifySsl`: Whether to verify SSL certificates for requests. + - `caBundlePath`: Path to a custom CA bundle for HTTP requests. + - `proxy`: Proxy URL for HTTP requests. + - `headers`: Custom headers for HTTP requests. + - `extraBodyProperties`: Additional properties to merge with the HTTP request body. + - `noProxy`: List of hostnames that should bypass the specified proxy. + - `clientCertificate`: Client certificate for HTTP requests. + - `cert`: Path to the client certificate file. + - `key`: Path to the client certificate key file. + - `passphrase`: Optional passphrase for the client certificate key file. + +#### Example: + +```yaml title="config.yaml" +models: + - name: GPT-4o + provider: openai + model: gpt-4o + roles: + - chat + - edit + - apply + defaultCompletionOptions: + temperature: 0.7 + maxTokens: 1500 + + - name: Codestral + provider: mistral + model: codestral-latest + roles: + - autocomplete ``` -### `tabAutocompleteModel` +--- -Specifies the model or models for tab autocompletion, defaulting to an Ollama instance. This property uses the same format as `models`. Can be an array of models or an object for one model. +### `context` + +The `context` section defines context providers, which supply additional information or context to the language models. Each context provider can be configured with specific parameters. + +More information about usage/params for each context provider can be found [here](/customize/context-providers) + +**Properties:** + +- `uses` (**required**): The identifier or name of the context provider (e.g., `code`, `docs`, `web`). +- `with`: Optional parameters to configure the context provider's behavior. + +**Example:** + +```yaml title="config.yaml" +context: + - uses: files + - uses: code + - uses: codebase + with: + nFinal: 10 + - uses: docs + - uses: diff + - uses: folder + - uses: terminal +``` + +--- + +### `rules` + +List of rules that the LLM should follow. These are inserted into the system message for all chat requests. Example -```json title="config.json (Deprecated)" -{ - "tabAutocompleteModel": { - "title": "My Starcoder", - "provider": "ollama", - "model": "starcoder2:3b" - } -} +```yaml title="config.yaml" +rules: + - Always annotate Python functions with their parameter and return types + - Always write Google style docstrings for functions and classes ``` -### `tabAutocompleteOptions` +--- -Specifies options for tab autocompletion behavior. +### `prompts` -**Properties:** +A list of custom prompts that can be invoked from the chat window. Each prompt has a name, description, and the actual prompt text. -- `disable`: If `true`, disables tab autocomplete (default: `false`). -- `useFileSuffix`: If `true`, includes file suffix in the prompt. -- `maxPromptTokens`: Maximum number of tokens for the prompt. -- `debounceDelay`: Delay (in ms) before triggering autocomplete. -- `maxSuffixPercentage`: Maximum percentage of prompt for suffix. -- `prefixPercentage`: Percentage of input for prefix. -- `template`: Template string for autocomplete, using Mustache templating. You can use the `{{{ prefix }}}`, `{{{ suffix }}}`, `{{{ filename }}}`, `{{{ reponame }}}`, and `{{{ language }}}` variables. -- `multilineCompletions`: Controls multiline completions (`"always"`, `"never"`, or `"auto"`). -- `useCache`: If `true`, caches completions. -- `onlyMyCode`: If `true`, only includes code within the repository. -- `disableInFiles`: Array of glob patterns for files where autocomplete is disabled. - -Example - -```json title="config.json (Deprecated)" -{ - "tabAutocompleteOptions": { - "debounceDelay": 500, - "maxPromptTokens": 1500, - "disableInFiles": ["*.md"] - } -} +```yaml title="config.yaml" +prompts: + - name: check + description: Check for mistakes in my code + prompt: | + Please read the highlighted code and check for any mistakes. You should look for the following, and be extremely vigilant: + - Syntax errors + - Logic errors + - Security vulnerabilities ``` -### `embeddingsProvider` - -Embeddings model settings - the model used for @Codebase and @docs. - -**Properties:** - -- `provider` (**required**): Specifies the embeddings provider, with options including `transformers.js`, `ollama`, `openai`, `cohere`, `free-trial`, `gemini`, etc -- `model`: Model name for embeddings. -- `apiKey`: API key for the provider. -- `apiBase`: Base URL for API requests. -- `requestOptions`: Additional HTTP request settings specific to the embeddings provider. -- `maxChunkSize`: Maximum tokens per document chunk. Minimum is 128 tokens. -- `maxBatchSize`: Maximum number of chunks per request. Minimum is 1 chunk. - -(AWS ONLY) - -- `region`: Specifies the region hosting the model. -- `profile`: AWS security profile. - -Example: - -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "provider": "openai", - "model": "text-embedding-ada-002", - "apiKey": "", - "maxChunkSize": 256, - "maxBatchSize": 5 - } -} -``` - -### `completionOptions` - -Parameters that control the behavior of text generation and completion settings. Top-level `completionOptions` apply to all models, _unless overridden at the model level_. - -**Properties:** - -- `stream`: Whether to stream the LLM response. Currently only respected by the `anthropic` and `ollama` providers; other providers will always stream (default: `true`). -- `temperature`: Controls the randomness of the completion. Higher values result in more diverse outputs. -- `topP`: The cumulative probability for nucleus sampling. Lower values limit responses to tokens within the top probability mass. -- `topK`: The maximum number of tokens considered at each step. Limits the generated text to tokens within this probability. -- `presencePenalty`: Discourages the model from generating tokens that have already appeared in the output. -- `frequencePenalty`: Penalizes tokens based on their frequency in the text, reducing repetition. -- `mirostat`: Enables Mirostat sampling, which controls the perplexity during text generation. Supported by Ollama, LM Studio, and llama.cpp providers (default: `0`, where `0` = disabled, `1` = Mirostat, and `2` = Mirostat 2.0). -- `stop`: An array of stop tokens that, when encountered, will terminate the completion. Allows specifying multiple end conditions. -- `maxTokens`: The maximum number of tokens to generate in a completion (default: `2048`). -- `numThreads`: The number of threads used during the generation process. Available only for Ollama as `num_thread`. -- `keepAlive`: For Ollama, this parameter sets the number of seconds to keep the model loaded after the last request, unloading it from memory if inactive (default: `1800` seconds, or 30 minutes). -- `useMmap`: For Ollama, this parameter allows the model to be mapped into memory. If disabled can enhance response time on low end devices but will slow down the stream. - -Example - -```json title="config.json (Deprecated)" -{ - "completionOptions": { - "stream": false, - "temperature": 0.5 - } -} -``` - -### `requestOptions` - -Default HTTP request options that apply to all models and context providers, unless overridden at the model level. - -**Properties:** - -- `timeout`: Timeout for each request to the LLM (default: 7200 seconds). -- `verifySsl`: Whether to verify SSL certificates for requests. -- `caBundlePath`: Path to a custom CA bundle for HTTP requests - path to `.pem` file (or array of paths) -- `proxy`: Proxy URL to use for HTTP requests. -- `headers`: Custom headers for HTTP requests. -- `extraBodyProperties`: Additional properties to merge with the HTTP request body. -- `noProxy`: List of hostnames that should bypass the specified proxy. -- `clientCertificate`: Client certificate for HTTP requests. - - - `cert`: Path to the client certificate file. - - `key`: Path to the client certificate key file. - - `passphrase`: Optional passphrase for the client certificate key file. - -Example - -```json title="config.json (Deprecated)" -{ - "requestOptions": { - "headers": { - "X-Auth-Token": "xxx" - } - } -} -``` - -### `reranker` - -Configuration for the reranker model used in response ranking. - -**Properties:** - -- `name` (**required**): Reranker name, e.g., `cohere`, `voyage`, `llm`, `free-trial`, `huggingface-tei`, `bedrock` -- `params`: - - `model`: Model name - - `apiKey`: Api key - - `region`: Region (for Bedrock only) - -Example - -```json title="config.json (Deprecated)" -{ - "reranker": { - "name": "voyage", - "params": { - "model": "rerank-2", - "apiKey": "" - } - } -} -``` +--- ### `docs` @@ -232,216 +177,145 @@ List of documentation sites to index. **Properties:** -- `title` (**required**): Title of the documentation site, displayed in dropdowns, etc. +- `name` (**required**): Name of the documentation site, displayed in dropdowns, etc. - `startUrl` (**required**): Start page for crawling - usually root or intro page for docs - `rootUrl`: Crawler will only index docs within this domain - pages that contain this URL -- `maxDepth`: Maximum depth for crawling. Default `3` - `favicon`: URL for site favicon (default is `/favicon.ico` from `startUrl`). Example -```json title="config.json (Deprecated)" -"docs": [ - { - "title": "Continue", - "startUrl": "https://docs.continue.dev/intro", - "rootUrl": "https://docs.continue.dev", - "faviconUrl": "https://docs.continue.dev/favicon.ico", - } -] +```yaml title="config.yaml" +docs: + - name: Continue + startUrl: https://docs.continue.dev/intro + rootUrl: https://docs.continue.dev + favicon: https://docs.continue.dev/favicon.ico ``` -### `slashCommands` +--- -Custom commands initiated by typing "/" in the sidebar. Commands include predefined functionality or may be user-defined. + -User-defined commands for prompt shortcuts in the sidebar, allowing quick access to common actions. +### `mcpServers` + + + +The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a standard proposed by Anthropic to unify prompts, context, and tool use. Continue supports any MCP server with the MCP context provider. **Properties:** -- `name`: The name of the custom command. -- `prompt`: Text prompt for the command. -- `description`: Brief description explaining the command's function. +- `name` (**required**): The name of the MCP server. +- `command` (**required**): The command used to start the server. +- `args`: An optional array of arguments for the command. +- `env`: An optional map of environment variables for the server process. -Example: +**Example:** -```json title="config.json (Deprecated)" -{ - "customCommands": [ - { - "name": "test", - "prompt": "Write a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.", - "description": "Write unit tests for highlighted code" - } - ] -} +```yaml title="config.yaml" +mcpServers: + - name: My MCP Server + command: uvx + args: + - mcp-server-sqlite + - --db-path + - /Users/NAME/test.db ``` -### `contextProviders` + -Prevents generating summary titles for each chat session when set to `true`. +--- -### `ui` +## Complete YAML Config Example -Customizable UI settings to control interface appearance and behavior. +Putting it all together, here's a complete example of a `config.yaml` configuration file: -**Properties:** +```yaml title="config.yaml" +name: MyProject +version: 0.0.1 -- `codeBlockToolbarPosition`: Sets the toolbar position within code blocks, either `top` (default) or `bottom`. -- `fontSize`: Specifies font size for UI elements. -- `displayRawMarkdown`: If `true`, shows raw markdown in responses. -- `showChatScrollbar`: If `true`, enables a scrollbar in the chat window. -- `codeWrap`: If `true`, enables text wrapping in code blocks. +models: + - name: GPT-4 + provider: openai + model: gpt-4 + roles: + - chat + - edit + defaultCompletionOptions: + temperature: 0.5 + maxTokens: 2000 + requestOptions: + headers: + Authorization: Bearer YOUR_OPENAI_API_KEY -Example: + - name: Ollama Starcoder + provider: ollama + model: starcoder + roles: + - autocomplete + defaultCompletionOptions: + temperature: 0.3 + stop: + - "\n" -```json title="config.json (Deprecated)" -{ - "ui": { - "codeBlockToolbarPosition": "bottom", - "fontSize": 14, - "displayRawMarkdown": false, - "showChatScrollbar": false, - "codeWrap": false - } -} -``` - -### `allowAnonymousTelemetry` - -When `true`, anonymous usage data is collected using Posthog, to improve features. Default is `true`. - -### `userToken` - -An optional token that identifies the user, primarily for authenticated services. - -### `systemMessage` - -Defines a system message that appears before every response from the language model, providing guidance or context. - -### `disableIndexing` - -Prevents indexing of the codebase, useful primarily for debugging purposes. - -### `experimental` - -Several experimental config parameters are available, as described below: - -`experimental`: - -- `defaultContext`: Defines the default context for the LLM. Uses the same format as `contextProviders` but includes an additional `query` property to specify custom query parameters.= -- `modelRoles`: - - `inlineEdit`: Model title for inline edits. - - `applyCodeBlock`: Model title for applying code blocks. - - `repoMapFileSelection`: Model title for repo map selections. -- `readResponseTTS`: If `true`, reads LLM responses aloud with TTS. Default is `true`. -- `promptPath`: Change the path to custom prompt files from the default ".prompts" -- `quickActions`: Array of custom quick actions - - `title` (**required**): Display title for the quick action. - - `prompt` (**required**): Prompt for quick action. - - `sendToChat`: If `true`, sends result to chat; else inserts in document. Default is `false`. -- `contextMenuPrompts`: - - `comment`: Prompt for commenting code. - - `docstring`: Prompt for adding docstrings. - - `fix`: Prompt for fixing code. - - `optimize`: Prompt for optimizing code. -- `useChromiumForDocsCrawling`: Use Chromium to crawl docs locally. Useful if the default Cheerio crawler fails on sites that require JavaScript rendering. Downloads and installs Chromium to `~/.continue/.utils`.. -- `modelContextProtocolServers`: See [Model Context Protocol](/customize/context-providers#model-context-protocol) - -Example - -```json title="config.json (Deprecated)" -{ - "experimental": { - "modelRoles": { - "inlineEdit": "Edit Model" - }, - "promptPath": "custom/.prompts", - "quickActions": [ - { - "title": "Tags", - "prompt": "Return a list of any function and class names from the included code block", - "sendToChat": true - } - ], - "contextMenuPrompts": { - "fixGrammar": "Fix grammar in the above but allow for typos." - }, - "readResponseTTS": false, - "useChromiumForDocsCrawling": true, - "modelContextProtocolServers": [ - { - "transport": { - "type": "stdio", - "command": "uvx", - "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"] - } - } - ] - } -} +rules: + - Give concise responses + - Always assume TypeScript rather than JavaScript + +prompts: + - name: test + description: Unit test a function + prompt: | + Please write a complete suite of unit tests for this function. You should use the Jest testing framework. The tests should cover all possible edge cases and should be as thorough as possible. You should also include a description of each test case. + +context: + - uses: diff + - uses: file + - uses: codebase + - uses: code + - uses: docs + with: + startUrl: https://docs.example.com/introduction + rootUrl: https://docs.example.com + maxDepth: 3 + +mcpServers: + - name: DevServer + command: npm + args: + - run + - dev + env: + PORT: "3000" ``` diff --git a/docs/docs/troubleshooting.md b/docs/docs/troubleshooting.mdx similarity index 91% rename from docs/docs/troubleshooting.md rename to docs/docs/troubleshooting.mdx index f6aaffb38..3b2713323 100644 --- a/docs/docs/troubleshooting.md +++ b/docs/docs/troubleshooting.mdx @@ -4,6 +4,9 @@ description: Troubleshooting while waiting for help during beta / alpha testing keywords: [reload, delete, manually, logs, server, console] --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + The Continue VS Code extension is currently in beta, and the JetBrains extension is in Alpha. If you are having trouble, please follow the steps below. 1. [Check the logs](#check-the-logs) @@ -24,7 +27,9 @@ To solve many problems, the first step is reading the logs to find the relevant In order to view debug logs, which contain extra information, click the dropdown at the top that says "Default levels" and select "Verbose". ::: -1. cmd + shift + P for MacOS or ctrl + shift + P for Windows +1. cmd + shift + P for MacOS or ctrl + + shift + + P for Windows 2. Search for and then select "Developer: Toggle Developer Tools" 3. This will open the [Chrome DevTools window](https://developer.chrome.com/docs/devtools/) 4. Select the `Console` tab @@ -85,20 +90,31 @@ If your keyboard shortcuts are not resolving, you may have other commands that a If you're seeing a `fetch failed` error and your network requires custom certificates, you will need to configure them in `config.json`. In each of the objects in the `"models"` array, add `requestOptions.caBundlePath` like this: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "My Model", + + + ```yaml title="config.yaml" + models: + - name: My Model ... - "requestOptions": { - "caBundlePath": "/path/to/cert.pem" + requestOptions: + caBundlePath: /path/to/cert.pem + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "My Model", + ... + "requestOptions": { + "caBundlePath": "/path/to/cert.pem" + } } - } - ], - ... -} -``` + ], + ... + ``` + + You may also set `requestOptions.caBundlePath` to an array of paths to multiple certificates. diff --git a/docs/docs/yaml-migration.md b/docs/docs/yaml-migration.md index a27e5d20d..f6a70bc64 100644 --- a/docs/docs/yaml-migration.md +++ b/docs/docs/yaml-migration.md @@ -11,8 +11,8 @@ Continue's YAML configuration format provides more readable, maintainable, consi See also - [Intro to YAML](https://yaml.org/) -- [JSON Continue Config Reference](/reference) -- [YAML Continue Config Reference](/yaml-reference) +- [JSON Continue Config Reference](/json-reference) +- [YAML Continue Config Reference](/reference) ## Create YAML file @@ -279,8 +279,6 @@ docs: ### MCP Servers - - **Properties:** - `name` (**required**): The name of the MCP server. diff --git a/docs/docs/yaml-reference.md b/docs/docs/yaml-reference.md deleted file mode 100644 index 4b3372f0c..000000000 --- a/docs/docs/yaml-reference.md +++ /dev/null @@ -1,321 +0,0 @@ ---- -title: Config YAML Reference -description: Reference for the Continue configuration YAML file -keywords: [config, yaml, configuration, customize, customization] ---- - -# Config YAML Reference - - - -Continue can be configured using a YAML file `config.yaml` which for local configuration can be placed in your global `.continue` folder (`~/.continue` on Mac, `%USERPROFILE%\.continue`) - -Below are details for each property that can be set in `config.yaml`. - -:::info -Config YAML does not work alongside `config.json` - it replaces it. View the **[Migration Guide](/yaml-migration)**. `config.yaml` currently only works in VS Code pre-release. -::: - -**All properties at all levels are optional unless explicitly marked as required.** - -## Properties - -The top-level properties in the `config.yaml` configuration file are: - -- [`name`](#name) (**required**) - -- [`version`](#version) (**required**) -- [`models`](#models) -- [`context`](#context) -- [`rules`](#rules) -- [`prompts`](#prompts) -- [`docs`](#docs) - - -- [`mcpServers`](#mcpservers) - ---- - -### `name` - -The `name` property specifies the name of your project or configuration. - -```yaml title="config.yaml" -name: MyProject -``` - -### `version` - -The `version` property specifies the version of your project or configuration. - ---- - -### `models` - -The `models` section defines the language models used in your configuration. Models are used for functionalities such as chat, editing, and summarizing. - -**Properties:** - -- `name` (**required**): A unique name to identify the model within your configuration. -- `provider` (**required**): The provider of the model (e.g., `openai`, `ollama`). -- `model` (**required**): The specific model name (e.g., `gpt-4`, `starcoder`). -- `roles`: An array specifying the roles this model can fulfill, such as `chat`, `autocomplete`, `embed`, `rerank`, `edit`, `apply`, `summarize`. -- `defaultCompletionOptions`: Default completion options for model settings. - - **Properties:** - - - `contextLength`: Maximum context length of the model, typically in tokens. - - `maxTokens`: Maximum number of tokens to generate in a completion. - - `temperature`: Controls the randomness of the completion. Values range from `0.0` (deterministic) to `1.0` (random). - - `topP`: The cumulative probability for nucleus sampling. - - `topK`: Maximum number of tokens considered at each step. - - `stop`: An array of stop tokens that will terminate the completion. - - `n`: Number of completions to generate. - -- `requestOptions`: HTTP request options specific to the model. - - **Properties:** - - - `timeout`: Timeout for each request to the language model. - - `verifySsl`: Whether to verify SSL certificates for requests. - - `caBundlePath`: Path to a custom CA bundle for HTTP requests. - - `proxy`: Proxy URL for HTTP requests. - - `headers`: Custom headers for HTTP requests. - - `extraBodyProperties`: Additional properties to merge with the HTTP request body. - - `noProxy`: List of hostnames that should bypass the specified proxy. - - `clientCertificate`: Client certificate for HTTP requests. - - `cert`: Path to the client certificate file. - - `key`: Path to the client certificate key file. - - `passphrase`: Optional passphrase for the client certificate key file. - -#### Example: - -```yaml title="config.yaml" -models: - - name: GPT-4o - provider: openai - model: gpt-4o - roles: - - chat - - edit - - apply - defaultCompletionOptions: - temperature: 0.7 - maxTokens: 1500 - - - name: Codestral - provider: mistral - model: codestral-latest - roles: - - autocomplete -``` - ---- - -### `context` - -The `context` section defines context providers, which supply additional information or context to the language models. Each context provider can be configured with specific parameters. - -More information about usage/params for each context provider can be found [here](/customize/context-providers) - -**Properties:** - -- `uses` (**required**): The identifier or name of the context provider (e.g., `code`, `docs`, `web`). -- `with`: Optional parameters to configure the context provider's behavior. - -**Example:** - -```yaml title="config.yaml" -context: - - uses: files - - uses: code - - uses: codebase - with: - nFinal: 10 - - uses: docs - - uses: diff - - uses: folder - - uses: terminal -``` - ---- - -### `rules` - -List of rules that the LLM should follow. These are inserted into the system message for all chat requests. - -Example - -```yaml title="config.yaml" -rules: - - Always annotate Python functions with their parameter and return types - - Always write Google style docstrings for functions and classes -``` - ---- - -### `prompts` - -A list of custom prompts that can be invoked from the chat window. Each prompt has a name, description, and the actual prompt text. - -```yaml title="config.yaml" -prompts: - - name: check - description: Check for mistakes in my code - prompt: | - Please read the highlighted code and check for any mistakes. You should look for the following, and be extremely vigilant: - - Syntax errors - - Logic errors - - Security vulnerabilities -``` - ---- - -### `docs` - -List of documentation sites to index. - -**Properties:** - -- `name` (**required**): Name of the documentation site, displayed in dropdowns, etc. -- `startUrl` (**required**): Start page for crawling - usually root or intro page for docs -- `rootUrl`: Crawler will only index docs within this domain - pages that contain this URL -- `favicon`: URL for site favicon (default is `/favicon.ico` from `startUrl`). - -Example - -```yaml title="config.yaml" -docs: - - name: Continue - startUrl: https://docs.continue.dev/intro - rootUrl: https://docs.continue.dev - favicon: https://docs.continue.dev/favicon.ico -``` - ---- - - - -### `mcpServers` - - - -The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a standard proposed by Anthropic to unify prompts, context, and tool use. Continue supports any MCP server with the MCP context provider. - -**Properties:** - -- `name` (**required**): The name of the MCP server. -- `command` (**required**): The command used to start the server. -- `args`: An optional array of arguments for the command. -- `env`: An optional map of environment variables for the server process. - -**Example:** - -```yaml title="config.yaml" -mcpServers: - - name: My MCP Server - command: uvx - args: - - mcp-server-sqlite - - --db-path - - /Users/NAME/test.db -``` - - - ---- - -## Complete YAML Config Example - -Putting it all together, here's a complete example of a `config.yaml` configuration file: - -```yaml title="config.yaml" -name: MyProject -version: 0.0.1 - -models: - - name: GPT-4 - provider: openai - model: gpt-4 - roles: - - chat - - edit - defaultCompletionOptions: - temperature: 0.5 - maxTokens: 2000 - requestOptions: - headers: - Authorization: Bearer YOUR_OPENAI_API_KEY - - - name: Ollama Starcoder - provider: ollama - model: starcoder - roles: - - autocomplete - defaultCompletionOptions: - temperature: 0.3 - stop: - - "\n" - -rules: - - Give concise responses - - Always assume TypeScript rather than JavaScript - -prompts: - - name: test - description: Unit test a function - prompt: | - Please write a complete suite of unit tests for this function. You should use the Jest testing framework. The tests should cover all possible edge cases and should be as thorough as possible. You should also include a description of each test case. - -context: - - uses: diff - - uses: file - - uses: codebase - - uses: code - - uses: docs - with: - startUrl: https://docs.example.com/introduction - rootUrl: https://docs.example.com - maxDepth: 3 - -mcpServers: - - name: DevServer - command: npm - args: - - run - - dev - env: - PORT: "3000" -``` diff --git a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/actions/how-to-customize.md b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/actions/how-to-customize.md index 2ffc4d0f2..aeadb68f8 100644 --- a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/actions/how-to-customize.md +++ b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/actions/how-to-customize.md @@ -7,7 +7,7 @@ sidebar_position: 5 ## 内置的斜杠命令 -Continue 有一个大的内置斜杠命令库,但是当你首次安装时,我们只显示最常用的一些,比如 "/edit", "/comment" 和 "/share" 。为了添加更多的 action ,你可以打开 [config.json](../reference.md) 并添加它们到 `slashCommands` 列表中。 +Continue 有一个大的内置斜杠命令库,但是当你首次安装时,我们只显示最常用的一些,比如 "/edit", "/comment" 和 "/share" 。为了添加更多的 action ,你可以打开 [config.json](../json-reference.md) 并添加它们到 `slashCommands` 列表中。 ## 定制斜杠命令 diff --git a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/autocomplete/how-to-customize.md b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/autocomplete/how-to-customize.md index 143645591..14a062a50 100644 --- a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/autocomplete/how-to-customize.md +++ b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/autocomplete/how-to-customize.md @@ -5,7 +5,7 @@ keywords: [定制] sidebar_position: 5 --- -Continue 在 [`config.json`](../reference.md) 提供少量的参数,对于你的特定需求和硬件能力,可以调整找到建议质量和系统性能之间的最佳平衡: +Continue 在 [`config.json`](../json-reference.md) 提供少量的参数,对于你的特定需求和硬件能力,可以调整找到建议质量和系统性能之间的最佳平衡: ```json title="config.json" "tabAutocompleteOptions": { diff --git a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/chat/context-selection.md b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/chat/context-selection.md index a52a5a3d7..301de5524 100644 --- a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/chat/context-selection.md +++ b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/chat/context-selection.md @@ -19,28 +19,28 @@ sidebar_position: 3 ## 指定文件 -你可以通过输入 [`@Files`](../customize/context-providers.md#file) 并选择文件,包含当前工作区中的指定文件作为上下文。 +你可以通过输入 [`@Files`](../customize/context-providers.mdx#file) 并选择文件,包含当前工作区中的指定文件作为上下文。 ## 指定目录 -你可以通过输入 [`@Folder`](../customize/context-providers.md#folder) 并选择目录,包含当前工作区中指定目录作为上下文。它像 [`@Codebase`](../customize/deep-dives/codebase.md) 一样工作,但是只包含指定目录中的文件。 +你可以通过输入 [`@Folder`](../customize/context-providers.mdx#folder) 并选择目录,包含当前工作区中指定目录作为上下文。它像 [`@Codebase`](../customize/deep-dives/codebase.md) 一样工作,但是只包含指定目录中的文件。 ## 整个代码库 -你可以通过输入 [`@Codebase`](../customize/context-providers.md#codebase) 包含整个代码库作为上下文。你可以 [在这里](../customize/deep-dives/codebase.md) 了解 `@Codebase` 是如何工作的。 +你可以通过输入 [`@Codebase`](../customize/context-providers.mdx#codebase) 包含整个代码库作为上下文。你可以 [在这里](../customize/deep-dives/codebase.md) 了解 `@Codebase` 是如何工作的。 ## 文档网址 -你可以通过输入 [`@Docs`](../customize/context-providers.md#docs) 并选择文档网址,包含文档网址作文上下文。你可以 [在这里](../customize/deep-dives/docs.md) 了解 `@Docs` 是如何工作的。 +你可以通过输入 [`@Docs`](../customize/context-providers.mdx#docs) 并选择文档网址,包含文档网址作文上下文。你可以 [在这里](../customize/deep-dives/docs.md) 了解 `@Docs` 是如何工作的。 ## 终端内容 -你可以通过输入 [`@Terminal`](../customize/context-providers.md#terminal) ,包含 IDE 中终端的内容作为上下文。 +你可以通过输入 [`@Terminal`](../customize/context-providers.mdx#terminal) ,包含 IDE 中终端的内容作为上下文。 ## Git diff -你可以通过输入 [`@Git Diff`](../customize/context-providers.md#git-diff) ,包含当前分支中你做的所有变更作为上下文。 +你可以通过输入 [`@Git Diff`](../customize/context-providers.mdx#git-diff) ,包含当前分支中你做的所有变更作为上下文。 ## 其他上下文 -你可以 [在这里](../customize/context-providers.md) 看到完整的内置上下文提供者列表,以及 [在这里](../customize/tutorials/build-your-own-context-provider.md) 看到如何创建你自己定制的上下文提供者。 +你可以 [在这里](../customize/context-providers.mdx) 看到完整的内置上下文提供者列表,以及 [在这里](../customize/tutorials/build-your-own-context-provider.md) 看到如何创建你自己定制的上下文提供者。 diff --git a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/chat/model-setup.mdx b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/chat/model-setup.mdx index cbbef8761..b6360c8d3 100644 --- a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/chat/model-setup.mdx +++ b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/chat/model-setup.mdx @@ -9,7 +9,7 @@ import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; :::info -这个页面推荐聊天的模型和提供者。在 [这里](../reference.md) 了解更多关于如何设置你的 `config.json` 。 +这个页面推荐聊天的模型和提供者。在 [这里](../json-reference.md) 了解更多关于如何设置你的 `config.json` 。 ::: ## 最好的总体体验 diff --git a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/deep-dives/autocomplete.md b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/deep-dives/autocomplete.md index 15cb94c4d..b31de7a74 100644 --- a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/deep-dives/autocomplete.md +++ b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/deep-dives/autocomplete.md @@ -44,7 +44,7 @@ ollama run starcoder2:3b } ``` -如果你对可用选项不熟悉,你可以在 [这里](../../reference.md) 查找完整的参考。 +如果你对可用选项不熟悉,你可以在 [这里](../../json-reference.md) 查找完整的参考。 ## 配置选项 diff --git a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/deep-dives/codebase.md b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/deep-dives/codebase.md index eb55aa668..969e394a0 100644 --- a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/deep-dives/codebase.md +++ b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/deep-dives/codebase.md @@ -73,4 +73,4 @@ Continue 遵守 `.gitignore` 文件,为了确定哪些文件不需要索引。 ## 仓库 map -Claude 3, Llama 3.1, Gemini 1.5 和 GPT-4o 家族的模型在代码库检索时会自动地使用 [仓库 map](../context-providers.md#repository-map) ,允许模型理解你的代码库的结构,并使用它回答问题。当前,仓库 map 仅包含代码库中的文件路径。 +Claude 3, Llama 3.1, Gemini 1.5 和 GPT-4o 家族的模型在代码库检索时会自动地使用 [仓库 map](../context-providers.mdx#repository-map) ,允许模型理解你的代码库的结构,并使用它回答问题。当前,仓库 map 仅包含代码库中的文件路径。 diff --git a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/deep-dives/prompt-files.md b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/deep-dives/prompt-files.md index bbcd0d36b..b419231fe 100644 --- a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/deep-dives/prompt-files.md +++ b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/deep-dives/prompt-files.md @@ -79,7 +79,7 @@ Write unit tests for the above selected code, following each of these instructio ### 上下文提供者 -任何你添加到配置中的 [上下文提供者](../context-providers.md) ,可以使用上下文提供者的名称引用。接收输入的上下文提供者也支持。 +任何你添加到配置中的 [上下文提供者](../context-providers.mdx) ,可以使用上下文提供者的名称引用。接收输入的上下文提供者也支持。 - `{{{ terminal }}}` - 终端的内容 - `{{{ url "https://github.com/continuedev/continue" }}}` - URL 的内容 diff --git a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/overview.md b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/overview.md index 1c5d041e2..0d94978c1 100644 --- a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/overview.md +++ b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/overview.md @@ -8,13 +8,13 @@ Continue 可以深度定制。这个主要通过编辑位于 `~/.continue/config ## 开始 -要打开 `config.json` ,在 Continue 聊天侧边栏的右下角点击 "齿轮" 图标。当编辑这个文件时,你可以使用 IntelliSense ,随着你的输入来查看有效的选项,或者你可以查看 [完整参考](../reference.md) 。 +要打开 `config.json` ,在 Continue 聊天侧边栏的右下角点击 "齿轮" 图标。当编辑这个文件时,你可以使用 IntelliSense ,随着你的输入来查看有效的选项,或者你可以查看 [完整参考](../json-reference.md) 。 当你保存 `config.json` 时, Continue 会自动地刷新,应用你的变更。 ## 每个工作区的配置 -如果你想要限制指定的配置到一个特定的工作区,你可以添加一个 `.continuerc.json` 到你的项目根目录。它有和 `config.json` 相同的 [定义](../reference.md) ,会自动地应用到本地 `config.json` 之上。 +如果你想要限制指定的配置到一个特定的工作区,你可以添加一个 `.continuerc.json` 到你的项目根目录。它有和 `config.json` 相同的 [定义](../json-reference.md) ,会自动地应用到本地 `config.json` 之上。 ## 可编程的配置 diff --git a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/edit/model-setup.md b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/edit/model-setup.md index 07a0a6c65..f0db33bbc 100644 --- a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/edit/model-setup.md +++ b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/edit/model-setup.md @@ -7,4 +7,4 @@ keywords: [编辑, cmd l, 模型] 默认情况下,编辑使用 [与聊天相同的模型](../chat/model-setup.mdx) ,所以对于代码编辑,我们推荐相同的 400B+ 参数模型或者领先的模型之一。 -你可以通过更新你的 [`config.json`](../reference.md) 为编辑配置一个不同的模型。 +你可以通过更新你的 [`config.json`](../json-reference.md) 为编辑配置一个不同的模型。 diff --git a/docs/sidebars.js b/docs/sidebars.js index c5026b1ef..12b084cd8 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -138,11 +138,11 @@ const sidebars = { label: "Reference", href: "/reference", }, - // { - // type: "link", - // label: "YAML Reference", - // href: "/yaml-reference", - // }, + { + type: "link", + label: "JSON Reference", + href: "/json-reference", + }, // { // type: "link", // label: "YAML Migration", From 3b302d7023282fc2880af3d48ccfd1d28f242904 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Fri, 17 Jan 2025 03:50:39 -0800 Subject: [PATCH 008/316] config yaml example -model providers p1 --- .../more/{SambaNova.md => SambaNova.mdx} | 3 + .../more/{asksage.md => asksage.mdx} | 5 +- .../more/{cerebras.md => cerebras.mdx} | 3 + .../more/{cloudflare.md => cloudflare.mdx} | 3 + .../more/{cohere.md => cohere.mdx} | 3 + .../more/{deepinfra.md => deepinfra.mdx} | 3 + .../more/{flowise.md => flowise.mdx} | 3 + .../more/{free-trial.md => free-trial.mdx} | 3 + ...nction-network.md => function-network.mdx} | 3 + .../more/{groq.md => groq.mdx} | 3 + ...enceapi.md => huggingfaceinferenceapi.mdx} | 3 + .../more/{ipex_llm.md => ipex_llm.mdx} | 3 + .../more/{kindo.md => kindo.mdx} | 3 + .../more/{llamacpp.md => llamacpp.mdx} | 3 + .../more/{llamafile.md => llamafile.mdx} | 3 + .../more/{lmstudio.md => lmstudio.mdx} | 3 + .../{moonshot.md => more/moonshot.mdx} | 3 + .../more/{msty.md => msty.mdx} | 3 + .../more/{nebius.md => nebius.mdx} | 3 + .../more/{novita.md => novita.mdx} | 3 + .../more/{nvidia.md => nvidia.mdx} | 5 +- .../more/{openrouter.md => openrouter.mdx} | 3 + .../{replicatellm.md => replicatellm.mdx} | 3 + .../more/{sagemaker.md => sagemaker.mdx} | 3 + .../more/{scaleway.md => scaleway.mdx} | 5 +- .../more/{siliconflow.md => siliconflow.mdx} | 5 +- .../{textgenwebui.md => textgenwebui.mdx} | 3 + .../more/{together.md => together.mdx} | 3 + .../more/{vllm.md => vllm.mdx} | 3 + .../more/{watsonx.md => watsonx.mdx} | 57 ++++++++++--------- .../top-level/{anthropic.md => anthropic.mdx} | 5 +- .../top-level/{azure.md => azure.mdx} | 3 + .../top-level/{vertexai.md => vertexai.mdx} | 5 +- .../top-level/{xAI.md => xAI.mdx} | 0 34 files changed, 125 insertions(+), 40 deletions(-) rename docs/docs/customize/model-providers/more/{SambaNova.md => SambaNova.mdx} (89%) rename docs/docs/customize/model-providers/more/{asksage.md => asksage.mdx} (97%) rename docs/docs/customize/model-providers/more/{cerebras.md => cerebras.mdx} (86%) rename docs/docs/customize/model-providers/more/{cloudflare.md => cloudflare.mdx} (95%) rename docs/docs/customize/model-providers/more/{cohere.md => cohere.mdx} (94%) rename docs/docs/customize/model-providers/more/{deepinfra.md => deepinfra.mdx} (91%) rename docs/docs/customize/model-providers/more/{flowise.md => flowise.mdx} (88%) rename docs/docs/customize/model-providers/more/{free-trial.md => free-trial.mdx} (95%) rename docs/docs/customize/model-providers/more/{function-network.md => function-network.mdx} (95%) rename docs/docs/customize/model-providers/more/{groq.md => groq.mdx} (85%) rename docs/docs/customize/model-providers/more/{huggingfaceinferenceapi.md => huggingfaceinferenceapi.mdx} (93%) rename docs/docs/customize/model-providers/more/{ipex_llm.md => ipex_llm.mdx} (95%) rename docs/docs/customize/model-providers/more/{kindo.md => kindo.mdx} (94%) rename docs/docs/customize/model-providers/more/{llamacpp.md => llamacpp.mdx} (89%) rename docs/docs/customize/model-providers/more/{llamafile.md => llamafile.mdx} (86%) rename docs/docs/customize/model-providers/more/{lmstudio.md => lmstudio.mdx} (94%) rename docs/docs/customize/model-providers/{moonshot.md => more/moonshot.mdx} (95%) rename docs/docs/customize/model-providers/more/{msty.md => msty.mdx} (97%) rename docs/docs/customize/model-providers/more/{nebius.md => nebius.mdx} (91%) rename docs/docs/customize/model-providers/more/{novita.md => novita.mdx} (95%) rename docs/docs/customize/model-providers/more/{nvidia.md => nvidia.mdx} (94%) rename docs/docs/customize/model-providers/more/{openrouter.md => openrouter.mdx} (94%) rename docs/docs/customize/model-providers/more/{replicatellm.md => replicatellm.mdx} (92%) rename docs/docs/customize/model-providers/more/{sagemaker.md => sagemaker.mdx} (94%) rename docs/docs/customize/model-providers/more/{scaleway.md => scaleway.mdx} (95%) rename docs/docs/customize/model-providers/more/{siliconflow.md => siliconflow.mdx} (93%) rename docs/docs/customize/model-providers/more/{textgenwebui.md => textgenwebui.mdx} (86%) rename docs/docs/customize/model-providers/more/{together.md => together.mdx} (90%) rename docs/docs/customize/model-providers/more/{vllm.md => vllm.mdx} (96%) rename docs/docs/customize/model-providers/more/{watsonx.md => watsonx.mdx} (73%) rename docs/docs/customize/model-providers/top-level/{anthropic.md => anthropic.mdx} (95%) rename docs/docs/customize/model-providers/top-level/{azure.md => azure.mdx} (97%) rename docs/docs/customize/model-providers/top-level/{vertexai.md => vertexai.mdx} (95%) rename docs/docs/customize/model-providers/top-level/{xAI.md => xAI.mdx} (100%) diff --git a/docs/docs/customize/model-providers/more/SambaNova.md b/docs/docs/customize/model-providers/more/SambaNova.mdx similarity index 89% rename from docs/docs/customize/model-providers/more/SambaNova.md rename to docs/docs/customize/model-providers/more/SambaNova.mdx index ab1e7238d..ffaf4b53d 100644 --- a/docs/docs/customize/model-providers/more/SambaNova.md +++ b/docs/docs/customize/model-providers/more/SambaNova.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # SambaNova Cloud The SambaNova Cloud is a cloud platform for running large AI models with the world record Llama 3.1 70B/405B performance. You can follow the instructions in [this blog post](https://sambanova.ai/blog/accelerating-coding-with-sambanova-cloud?ref=blog.continue.dev) to configure your setup. diff --git a/docs/docs/customize/model-providers/more/asksage.md b/docs/docs/customize/model-providers/more/asksage.mdx similarity index 97% rename from docs/docs/customize/model-providers/more/asksage.md rename to docs/docs/customize/model-providers/more/asksage.mdx index a4445ba77..fcccdd750 100644 --- a/docs/docs/customize/model-providers/more/asksage.md +++ b/docs/docs/customize/model-providers/more/asksage.mdx @@ -1,9 +1,10 @@ # Ask Sage +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + :::info - To get an Ask Sage API key login to the Ask Sage platform (If you don't have an account, you can create one [here](https://chat.asksage.ai/)) and follow the instructions in the Ask Sage Docs:[Ask Sage API Key](https://docs.asksage.ai/docs/api-documentation/api-documentation.html) - ::: ## Configuration diff --git a/docs/docs/customize/model-providers/more/cerebras.md b/docs/docs/customize/model-providers/more/cerebras.mdx similarity index 86% rename from docs/docs/customize/model-providers/more/cerebras.md rename to docs/docs/customize/model-providers/more/cerebras.mdx index 1fdc040ed..f9ccb88cc 100644 --- a/docs/docs/customize/model-providers/more/cerebras.md +++ b/docs/docs/customize/model-providers/more/cerebras.mdx @@ -1,5 +1,8 @@ # Cerebras Inference +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + Cerebras Inference uses specialized silicon to provides fast inference. 1. Create an account in the portal [here](https://cloud.cerebras.ai/). diff --git a/docs/docs/customize/model-providers/more/cloudflare.md b/docs/docs/customize/model-providers/more/cloudflare.mdx similarity index 95% rename from docs/docs/customize/model-providers/more/cloudflare.md rename to docs/docs/customize/model-providers/more/cloudflare.mdx index fb355704b..7d3058548 100644 --- a/docs/docs/customize/model-providers/more/cloudflare.md +++ b/docs/docs/customize/model-providers/more/cloudflare.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # Cloudflare Workers AI Cloudflare Workers AI can be used for both chat and tab autocompletion in Continue. To setup Cloudflare Workers AI, add the following to your `config.json` file: diff --git a/docs/docs/customize/model-providers/more/cohere.md b/docs/docs/customize/model-providers/more/cohere.mdx similarity index 94% rename from docs/docs/customize/model-providers/more/cohere.md rename to docs/docs/customize/model-providers/more/cohere.mdx index 4e2309e4f..dcdd39b01 100644 --- a/docs/docs/customize/model-providers/more/cohere.md +++ b/docs/docs/customize/model-providers/more/cohere.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # Cohere Before using Cohere, visit the [Cohere dashboard](https://dashboard.cohere.com/api-keys) to create an API key. diff --git a/docs/docs/customize/model-providers/more/deepinfra.md b/docs/docs/customize/model-providers/more/deepinfra.mdx similarity index 91% rename from docs/docs/customize/model-providers/more/deepinfra.md rename to docs/docs/customize/model-providers/more/deepinfra.mdx index 0c31466e4..418ff15f9 100644 --- a/docs/docs/customize/model-providers/more/deepinfra.md +++ b/docs/docs/customize/model-providers/more/deepinfra.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # DeepInfra [DeepInfra](https://deepinfra.com) provides inference for open-source models at very low cost. To get started with DeepInfra, obtain your API key [here](https://deepinfra.com/dash). Then, find the model you want to use [here](https://deepinfra.com/models?type=text-generation) and copy the name of the model. Continue can then be configured to use the `DeepInfra` LLM class, like the example here: diff --git a/docs/docs/customize/model-providers/more/flowise.md b/docs/docs/customize/model-providers/more/flowise.mdx similarity index 88% rename from docs/docs/customize/model-providers/more/flowise.md rename to docs/docs/customize/model-providers/more/flowise.mdx index 8302f0936..91516ee12 100644 --- a/docs/docs/customize/model-providers/more/flowise.md +++ b/docs/docs/customize/model-providers/more/flowise.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # Flowise [Flowise](https://flowiseai.com/) is a low-code/no-code drag & drop tool with the aim to make it easy for people to visualize and build LLM apps. Continue can then be configured to use the `Flowise` LLM class, like the example here: diff --git a/docs/docs/customize/model-providers/more/free-trial.md b/docs/docs/customize/model-providers/more/free-trial.mdx similarity index 95% rename from docs/docs/customize/model-providers/more/free-trial.md rename to docs/docs/customize/model-providers/more/free-trial.mdx index a51d2e61c..b5fd710f8 100644 --- a/docs/docs/customize/model-providers/more/free-trial.md +++ b/docs/docs/customize/model-providers/more/free-trial.mdx @@ -3,6 +3,9 @@ title: Free Trial slug: ../free-trial --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + The `"free-trial"` provider lets new users quickly try out the best experience in Continue using our API keys through a secure proxy server. To prevent abuse, we will ask you to sign in with GitHub, which you can read more about below. While the Continue extension is always free to use, we cannot support infinite free LLM usage for all of our users. You will eventually need to either: diff --git a/docs/docs/customize/model-providers/more/function-network.md b/docs/docs/customize/model-providers/more/function-network.mdx similarity index 95% rename from docs/docs/customize/model-providers/more/function-network.md rename to docs/docs/customize/model-providers/more/function-network.mdx index 5c9ee3b40..b48f80f97 100644 --- a/docs/docs/customize/model-providers/more/function-network.md +++ b/docs/docs/customize/model-providers/more/function-network.mdx @@ -3,6 +3,9 @@ title: Function Network slug: ../function-network --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # Function Network > Private, Affordable User-Owned AI diff --git a/docs/docs/customize/model-providers/more/groq.md b/docs/docs/customize/model-providers/more/groq.mdx similarity index 85% rename from docs/docs/customize/model-providers/more/groq.md rename to docs/docs/customize/model-providers/more/groq.mdx index ab8a7e278..13f9bbc87 100644 --- a/docs/docs/customize/model-providers/more/groq.md +++ b/docs/docs/customize/model-providers/more/groq.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # Groq Groq provides the fastest available inference for open-source language models, including the entire Llama 3.1 family. diff --git a/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.md b/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx similarity index 93% rename from docs/docs/customize/model-providers/more/huggingfaceinferenceapi.md rename to docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx index 76f0d6f3b..516cc15b6 100644 --- a/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.md +++ b/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # HuggingFace Inference Endpoints Hugging Face Inference Endpoints are an easy way to setup instances of open-source language models on any cloud. Sign up for an account and add billing [here](https://huggingface.co/settings/billing), access the Inference Endpoints [here](https://ui.endpoints.huggingface.co), click on “New endpoint”, and fill out the form (e.g. select a model like [WizardCoder-Python-34B-V1.0](https://huggingface.co/WizardLM/WizardCoder-Python-34B-V1.0)), and then deploy your model by clicking “Create Endpoint”. Change `~/.continue/config.json` to look like this: diff --git a/docs/docs/customize/model-providers/more/ipex_llm.md b/docs/docs/customize/model-providers/more/ipex_llm.mdx similarity index 95% rename from docs/docs/customize/model-providers/more/ipex_llm.md rename to docs/docs/customize/model-providers/more/ipex_llm.mdx index 60c3a792a..c711a81ac 100644 --- a/docs/docs/customize/model-providers/more/ipex_llm.md +++ b/docs/docs/customize/model-providers/more/ipex_llm.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # IPEX-LLM :::info diff --git a/docs/docs/customize/model-providers/more/kindo.md b/docs/docs/customize/model-providers/more/kindo.mdx similarity index 94% rename from docs/docs/customize/model-providers/more/kindo.md rename to docs/docs/customize/model-providers/more/kindo.mdx index a324cf2f0..745ec3019 100644 --- a/docs/docs/customize/model-providers/more/kindo.md +++ b/docs/docs/customize/model-providers/more/kindo.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # Kindo Kindo offers centralized control over your organization's AI operations, ensuring data protection and compliance with internal policies while supporting various commercial and open-source models. To get started, sign up [here](https://app.kindo.ai/), create an API key in [Settings > API > API Keys](https://app.kindo.ai/settings/api), and choose a model from the list of supported models in the "Available Models" tab or copy and paste the config in [Plugins > Your Configuration](https://app.kindo.ai/plugins). diff --git a/docs/docs/customize/model-providers/more/llamacpp.md b/docs/docs/customize/model-providers/more/llamacpp.mdx similarity index 89% rename from docs/docs/customize/model-providers/more/llamacpp.md rename to docs/docs/customize/model-providers/more/llamacpp.mdx index e1534c651..12f2264d8 100644 --- a/docs/docs/customize/model-providers/more/llamacpp.md +++ b/docs/docs/customize/model-providers/more/llamacpp.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # LlamaCpp Run the llama.cpp server binary to start the API server. If running on a remote server, be sure to set host to 0.0.0.0: diff --git a/docs/docs/customize/model-providers/more/llamafile.md b/docs/docs/customize/model-providers/more/llamafile.mdx similarity index 86% rename from docs/docs/customize/model-providers/more/llamafile.md rename to docs/docs/customize/model-providers/more/llamafile.mdx index b11870624..58df64c23 100644 --- a/docs/docs/customize/model-providers/more/llamafile.md +++ b/docs/docs/customize/model-providers/more/llamafile.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # Llamafile A [llamafile](https://github.com/Mozilla-Ocho/llamafile#readme) is a self-contained binary that can run an open-source LLM. You can configure this provider in your config.json as follows: diff --git a/docs/docs/customize/model-providers/more/lmstudio.md b/docs/docs/customize/model-providers/more/lmstudio.mdx similarity index 94% rename from docs/docs/customize/model-providers/more/lmstudio.md rename to docs/docs/customize/model-providers/more/lmstudio.mdx index 19114c217..6bca26aa9 100644 --- a/docs/docs/customize/model-providers/more/lmstudio.md +++ b/docs/docs/customize/model-providers/more/lmstudio.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # LM Studio [LM Studio](https://lmstudio.ai) is an application for Mac, Windows, and Linux that makes it easy to locally run open-source models and comes with a great UI. To get started with LM Studio, download from the website, use the UI to download a model, and then start the local inference server. Continue can then be configured to use the `LMStudio` LLM class: diff --git a/docs/docs/customize/model-providers/moonshot.md b/docs/docs/customize/model-providers/more/moonshot.mdx similarity index 95% rename from docs/docs/customize/model-providers/moonshot.md rename to docs/docs/customize/model-providers/more/moonshot.mdx index c182cf4dd..0a6f5381e 100644 --- a/docs/docs/customize/model-providers/moonshot.md +++ b/docs/docs/customize/model-providers/more/moonshot.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # Moonshot [Moonshot AI](https://platform.moonshot.cn/) provides high-quality large language model services with competitive pricing and excellent performance. diff --git a/docs/docs/customize/model-providers/more/msty.md b/docs/docs/customize/model-providers/more/msty.mdx similarity index 97% rename from docs/docs/customize/model-providers/more/msty.md rename to docs/docs/customize/model-providers/more/msty.mdx index ce930ace3..77d9a1056 100644 --- a/docs/docs/customize/model-providers/more/msty.md +++ b/docs/docs/customize/model-providers/more/msty.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # Msty [Msty](https://msty.app/) is an application for Windows, Mac, and Linux that makes it really easy to run online as well as local open-source models, including Llama-2, DeepSeek Coder, etc. No need to fidget with your terminal, run a command, or anything. Just download the app from the website, click a button, and you are up and running. Continue can then be configured to use the `Msty` LLM class: diff --git a/docs/docs/customize/model-providers/more/nebius.md b/docs/docs/customize/model-providers/more/nebius.mdx similarity index 91% rename from docs/docs/customize/model-providers/more/nebius.md rename to docs/docs/customize/model-providers/more/nebius.mdx index 92bc6a997..ec32edd23 100644 --- a/docs/docs/customize/model-providers/more/nebius.md +++ b/docs/docs/customize/model-providers/more/nebius.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # Nebius AI Studio You can get an API key from the [Nebius AI Studio API keys page](https://studio.nebius.ai/settings/api-keys) diff --git a/docs/docs/customize/model-providers/more/novita.md b/docs/docs/customize/model-providers/more/novita.mdx similarity index 95% rename from docs/docs/customize/model-providers/more/novita.md rename to docs/docs/customize/model-providers/more/novita.mdx index 5b829bf91..799a4cf62 100644 --- a/docs/docs/customize/model-providers/more/novita.md +++ b/docs/docs/customize/model-providers/more/novita.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # Novita [Novita AI](https://novita.ai?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link) offers an affordable, reliable, and simple inference platform with scalable [LLM API](https://novita.ai/docs/model-api/reference/introduction.html), empowering developers to build AI applications. Try the [Novita AI Llama 3 API Demo](https://novita.ai/model-api/product/llm-api/playground/meta-llama-llama-3.1-70b-instruct?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link) today!. You can sign up [here](https://novita.ai/user/login?&redirect=/&utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link), copy your API key on the [Key Management](https://novita.ai/settings/key-management?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link), and then hit the play button on any model from the [Novita AI Models list](https://novita.ai/llm-api?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link). Change `~/.continue/config.json` to look like this: diff --git a/docs/docs/customize/model-providers/more/nvidia.md b/docs/docs/customize/model-providers/more/nvidia.mdx similarity index 94% rename from docs/docs/customize/model-providers/more/nvidia.md rename to docs/docs/customize/model-providers/more/nvidia.mdx index 89e2136e8..fde522cea 100644 --- a/docs/docs/customize/model-providers/more/nvidia.md +++ b/docs/docs/customize/model-providers/more/nvidia.mdx @@ -2,10 +2,11 @@ title: NVIDIA --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + :::info - [View the docs](https://docs.nvidia.com/nim/large-language-models/latest/getting-started.html#option-1-from-api-catalog) to learn how to get an API key. - ::: ## Chat model diff --git a/docs/docs/customize/model-providers/more/openrouter.md b/docs/docs/customize/model-providers/more/openrouter.mdx similarity index 94% rename from docs/docs/customize/model-providers/more/openrouter.md rename to docs/docs/customize/model-providers/more/openrouter.mdx index bfd86ec69..7f01c463a 100644 --- a/docs/docs/customize/model-providers/more/openrouter.md +++ b/docs/docs/customize/model-providers/more/openrouter.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # OpenRouter OpenRouter is a unified interface for commercial and open-source models, giving you access to the best models at the best prices. You can sign up [here](https://openrouter.ai/signup), create your API key on the [keys page](https://openrouter.ai/keys), and then choose a model from the [list of supported models](https://openrouter.ai/models). diff --git a/docs/docs/customize/model-providers/more/replicatellm.md b/docs/docs/customize/model-providers/more/replicatellm.mdx similarity index 92% rename from docs/docs/customize/model-providers/more/replicatellm.md rename to docs/docs/customize/model-providers/more/replicatellm.mdx index 34c72e010..c87b152a3 100644 --- a/docs/docs/customize/model-providers/more/replicatellm.md +++ b/docs/docs/customize/model-providers/more/replicatellm.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # ReplicateLLM Replicate is a great option for newly released language models or models that you've deployed through their platform. Sign up for an account [here](https://replicate.ai/), copy your API key, and then select any model from the [Replicate Streaming List](https://replicate.com/collections/streaming-language-models). Change `~/.continue/config.json` to look like this: diff --git a/docs/docs/customize/model-providers/more/sagemaker.md b/docs/docs/customize/model-providers/more/sagemaker.mdx similarity index 94% rename from docs/docs/customize/model-providers/more/sagemaker.md rename to docs/docs/customize/model-providers/more/sagemaker.mdx index a7b82c353..c39b5bc7f 100644 --- a/docs/docs/customize/model-providers/more/sagemaker.md +++ b/docs/docs/customize/model-providers/more/sagemaker.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # AWS SageMaker SageMaker can be used for both chat and embedding models. Chat models are supported for endpoints deployed with [LMI](https://docs.djl.ai/docs/serving/serving/docs/lmi/index.html), and embedding models are supported for endpoints deployed with [HuggingFace TEI](https://huggingface.co/blog/sagemaker-huggingface-embedding) diff --git a/docs/docs/customize/model-providers/more/scaleway.md b/docs/docs/customize/model-providers/more/scaleway.mdx similarity index 95% rename from docs/docs/customize/model-providers/more/scaleway.md rename to docs/docs/customize/model-providers/more/scaleway.mdx index dce234f49..3f0d8ac54 100644 --- a/docs/docs/customize/model-providers/more/scaleway.md +++ b/docs/docs/customize/model-providers/more/scaleway.mdx @@ -2,12 +2,13 @@ title: Scaleway --- -:::info +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; +:::info Scaleway Generative APIs give you instant access to leading AI models hosted in European data centers, ideal for developers requiring low latency, full data privacy, and compliance with EU AI Act. You can generate your API key in [Scaleway's console](https://console.scaleway.com/generative-api/models). Read the [quickstart documentation here](https://www.scaleway.com/en/docs/ai-data/generative-apis/quickstart/). - ::: ## Chat model diff --git a/docs/docs/customize/model-providers/more/siliconflow.md b/docs/docs/customize/model-providers/more/siliconflow.mdx similarity index 93% rename from docs/docs/customize/model-providers/more/siliconflow.md rename to docs/docs/customize/model-providers/more/siliconflow.mdx index 96c7a90df..d5814d567 100644 --- a/docs/docs/customize/model-providers/more/siliconflow.md +++ b/docs/docs/customize/model-providers/more/siliconflow.mdx @@ -2,10 +2,11 @@ title: SiliconFlow --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + :::info - You can get an API key from the [Silicon Cloud](https://cloud.siliconflow.cn/account/ak). - ::: ## Chat model diff --git a/docs/docs/customize/model-providers/more/textgenwebui.md b/docs/docs/customize/model-providers/more/textgenwebui.mdx similarity index 86% rename from docs/docs/customize/model-providers/more/textgenwebui.md rename to docs/docs/customize/model-providers/more/textgenwebui.mdx index 66ea07268..ea9c626b5 100644 --- a/docs/docs/customize/model-providers/more/textgenwebui.md +++ b/docs/docs/customize/model-providers/more/textgenwebui.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # TextGenWebUI TextGenWebUI is a comprehensive, open-source language model UI and local server. You can set it up with an OpenAI-compatible server plugin, and then configure it in your `config.json` like this: diff --git a/docs/docs/customize/model-providers/more/together.md b/docs/docs/customize/model-providers/more/together.mdx similarity index 90% rename from docs/docs/customize/model-providers/more/together.md rename to docs/docs/customize/model-providers/more/together.mdx index 9025c50b1..8cab190da 100644 --- a/docs/docs/customize/model-providers/more/together.md +++ b/docs/docs/customize/model-providers/more/together.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # Together The Together API is a cloud platform for running large AI models. You can sign up [here](https://api.together.xyz/signup), copy your API key on the initial welcome screen, and then hit the play button on any model from the [Together Models list](https://docs.together.ai/docs/serverless-models). Change `~/.continue/config.json` to look like this: diff --git a/docs/docs/customize/model-providers/more/vllm.md b/docs/docs/customize/model-providers/more/vllm.mdx similarity index 96% rename from docs/docs/customize/model-providers/more/vllm.md rename to docs/docs/customize/model-providers/more/vllm.mdx index 45daa168e..3bbf89707 100644 --- a/docs/docs/customize/model-providers/more/vllm.md +++ b/docs/docs/customize/model-providers/more/vllm.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # vLLM vLLM is an open-source library for fast LLM inference which typically is used to serve multiple users at the same. It can also be used to run a large model on multiple GPU:s (e.g. when it doesn´t fit in a single GPU). Run their OpenAI-compatible server using `vllm serve`. See their [server documentation](https://docs.vllm.ai/en/latest/serving/openai_compatible_server.html) and the [engine arguments documentation](https://docs.vllm.ai/en/latest/usage/engine_args.html). diff --git a/docs/docs/customize/model-providers/more/watsonx.md b/docs/docs/customize/model-providers/more/watsonx.mdx similarity index 73% rename from docs/docs/customize/model-providers/more/watsonx.md rename to docs/docs/customize/model-providers/more/watsonx.mdx index eeeb6073f..428e7f0d3 100644 --- a/docs/docs/customize/model-providers/more/watsonx.md +++ b/docs/docs/customize/model-providers/more/watsonx.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # IBM watsonx watsonx, developed by IBM, offers a variety of pre-trained AI foundation models that can be used for natural language processing (NLP), computer vision, and speech recognition tasks. @@ -21,20 +24,20 @@ To authenticate to watsonx.ai SaaS with Continue, you will need to create a proj To authenticate to your watsonx.ai Software instance with Continue, you can use either `username/password` or `ZenApiKey` method: 1. _Option 1_ (Recommended): using `ZenApiKey` authentication: - - Set **apiBase** to your watsonx software endpoint, e.g. `https://cpd-watsonx.apps.example.com`. - - Set **projectId** to your watsonx project ID. - - Set **apiKey** to your watsonx Zen API Key. To generate it: - 1. Log in to the CPD web client. - 2. From the toolbar, click your avatar. - 3. Click **Profile and settings**. - 4. Click **API key** > **Generate new key**. - 5. Click **Generate**. - 6. Click **Copy** and save your key somewhere safe. You cannot recover this key if you lose it. - 7. Generate your ZenApiKey by running the following command in your preferred terminal: `echo ":" | base64`, replacing `` with your CPD username and `` with the API Key you just created. + - Set **apiBase** to your watsonx software endpoint, e.g. `https://cpd-watsonx.apps.example.com`. + - Set **projectId** to your watsonx project ID. + - Set **apiKey** to your watsonx Zen API Key. To generate it: + 1. Log in to the CPD web client. + 2. From the toolbar, click your avatar. + 3. Click **Profile and settings**. + 4. Click **API key** > **Generate new key**. + 5. Click **Generate**. + 6. Click **Copy** and save your key somewhere safe. You cannot recover this key if you lose it. + 7. Generate your ZenApiKey by running the following command in your preferred terminal: `echo ":" | base64`, replacing `` with your CPD username and `` with the API Key you just created. 2. _Option 2_: using `username/password` authentication: - - Set **apiBase** to your watsonx software endpoint, e.g. `https://cpd-watsonx.apps.example.com`. - - Set **projectId** to your watsonx project ID. - - Set **API Key** to your watsonx Username and Password using `username:password` as format. + - Set **apiBase** to your watsonx software endpoint, e.g. `https://cpd-watsonx.apps.example.com`. + - Set **projectId** to your watsonx project ID. + - Set **API Key** to your watsonx Username and Password using `username:password` as format. ## Configuration @@ -58,7 +61,6 @@ Add the following configuration to your `config.json` file to use the watsonx pr `apiVersion` is optional and defaults to the latest version. - If you are using a custom deployment endpoint, set `deploymentID` to the model's deployment ID. You can find it in the watsonx.ai Prompt Lab UI by selecting the corresponding model and opening the `` tab on the right, which will display the endpoint's URL containing the deployment ID. ```json title="~/.continue/config.json" @@ -101,10 +103,7 @@ You can also configure generation parameters, such as temperature, topP, topK, f "topK": 20, "maxTokens": 2000, "frequencyPenalty": 1.1, - "stop": [ - "Question:", - "\n\n\n" - ] + "stop": ["Question:", "\n\n\n"] } } ] @@ -114,24 +113,26 @@ You can also configure generation parameters, such as temperature, topP, topK, f ## Tab Auto Complete Model Granite models are recommended for tab auto complete. The configuration is similar to that of the chat models: + ```json title="~/.continue/config.json" { - "tabAutocompleteModel": { - "model": "ibm/granite-8b-code-instruct", - "title": "Granite Code 8b", - "provider": "watsonx", - "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com", - "projectId": "PROJECT_ID", - "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", - "apiVersion": "2024-03-14", - "contextLength": 4000 - } + "tabAutocompleteModel": { + "model": "ibm/granite-8b-code-instruct", + "title": "Granite Code 8b", + "provider": "watsonx", + "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com", + "projectId": "PROJECT_ID", + "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", + "apiVersion": "2024-03-14", + "contextLength": 4000 + } } ``` ## Embeddings Model To view the list of available embeddings models, visit [this page](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/fm-models-embed.html?context=wx&pos=2#ibm-provided). + ```json title="~/.continue/config.json { "embeddingsProvider": { diff --git a/docs/docs/customize/model-providers/top-level/anthropic.md b/docs/docs/customize/model-providers/top-level/anthropic.mdx similarity index 95% rename from docs/docs/customize/model-providers/top-level/anthropic.md rename to docs/docs/customize/model-providers/top-level/anthropic.mdx index a7fa42888..8ef4ebb64 100644 --- a/docs/docs/customize/model-providers/top-level/anthropic.md +++ b/docs/docs/customize/model-providers/top-level/anthropic.mdx @@ -3,10 +3,11 @@ title: Anthropic slug: ../anthropic --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + :::info - You can get an API key from the [Anthropic console](https://console.anthropic.com/account/keys). - ::: ## Chat model diff --git a/docs/docs/customize/model-providers/top-level/azure.md b/docs/docs/customize/model-providers/top-level/azure.mdx similarity index 97% rename from docs/docs/customize/model-providers/top-level/azure.md rename to docs/docs/customize/model-providers/top-level/azure.mdx index 02cfcdd0d..111460b73 100644 --- a/docs/docs/customize/model-providers/top-level/azure.md +++ b/docs/docs/customize/model-providers/top-level/azure.mdx @@ -3,6 +3,9 @@ title: Azure AI Foundry slug: ../azure --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + Azure AI Foundry is a cloud-based service that provides access to models from OpenAI, Mistral AI, and others, integrated with the security and enterprise features of the Microsoft Azure platform. To get started, create an Azure AI Foundry resource in the [Azure portal](https://portal.azure.com). :::info diff --git a/docs/docs/customize/model-providers/top-level/vertexai.md b/docs/docs/customize/model-providers/top-level/vertexai.mdx similarity index 95% rename from docs/docs/customize/model-providers/top-level/vertexai.md rename to docs/docs/customize/model-providers/top-level/vertexai.mdx index a02609f35..5f5eb4fb7 100644 --- a/docs/docs/customize/model-providers/top-level/vertexai.md +++ b/docs/docs/customize/model-providers/top-level/vertexai.mdx @@ -3,10 +3,11 @@ title: Vertex AI slug: ../vertexai --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + :::info - You need to enable the [Vertex AI API](https://console.cloud.google.com/marketplace/product/google/aiplatform.googleapis.com) and set up the [Google Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc). - ::: ## Chat model diff --git a/docs/docs/customize/model-providers/top-level/xAI.md b/docs/docs/customize/model-providers/top-level/xAI.mdx similarity index 100% rename from docs/docs/customize/model-providers/top-level/xAI.md rename to docs/docs/customize/model-providers/top-level/xAI.mdx From f046f8bd4d106d76b43645ddc10e784bda74a639 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Fri, 17 Jan 2025 10:08:30 -0800 Subject: [PATCH 009/316] model provider yaml examples continued --- .../more/huggingfaceinferenceapi.mdx | 38 +++-- .../model-providers/more/together.mdx | 35 ++-- .../model-providers/top-level/deepseek.mdx | 70 +++++--- .../model-providers/top-level/vertexai.mdx | 108 ++++++++---- .../model-providers/top-level/xAI.mdx | 40 +++-- .../{embeddings.md => embeddings.mdx} | 0 docs/docs/customize/model-types/reranking.md | 93 ----------- docs/docs/customize/model-types/reranking.mdx | 156 ++++++++++++++++++ docs/docs/getting-started/install.md | 4 +- 9 files changed, 353 insertions(+), 191 deletions(-) rename docs/docs/customize/model-types/{embeddings.md => embeddings.mdx} (100%) delete mode 100644 docs/docs/customize/model-types/reranking.md create mode 100644 docs/docs/customize/model-types/reranking.mdx diff --git a/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx b/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx index 516cc15b6..ae08459e0 100644 --- a/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx +++ b/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx @@ -5,18 +5,30 @@ import TabItem from "@theme/TabItem"; Hugging Face Inference Endpoints are an easy way to setup instances of open-source language models on any cloud. Sign up for an account and add billing [here](https://huggingface.co/settings/billing), access the Inference Endpoints [here](https://ui.endpoints.huggingface.co), click on “New endpoint”, and fill out the form (e.g. select a model like [WizardCoder-Python-34B-V1.0](https://huggingface.co/WizardLM/WizardCoder-Python-34B-V1.0)), and then deploy your model by clicking “Create Endpoint”. Change `~/.continue/config.json` to look like this: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Hugging Face Inference API", - "provider": "huggingface-inference-api", - "model": "MODEL_NAME", - "apiKey": "YOUR_HF_TOKEN", - "apiBase": "INFERENCE_API_ENDPOINT_URL" - } - ] -} -``` + + + ```yaml title="config.yaml" + models: + - name: Hugging Face Inference API + provider: huggingface-inference-api + model: MODEL_NAME + apiKeySecret: HF_TOKEN + apiBase: HF_URL_BASE + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Hugging Face Inference API", + "provider": "huggingface-inference-api", + "model": "MODEL_NAME", + "apiKey": "YOUR_HF_TOKEN", + "apiBase": "" + } + ] + ``` + + [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/HuggingFaceInferenceAPI.ts) diff --git a/docs/docs/customize/model-providers/more/together.mdx b/docs/docs/customize/model-providers/more/together.mdx index 8cab190da..095005bf5 100644 --- a/docs/docs/customize/model-providers/more/together.mdx +++ b/docs/docs/customize/model-providers/more/together.mdx @@ -5,17 +5,28 @@ import TabItem from "@theme/TabItem"; The Together API is a cloud platform for running large AI models. You can sign up [here](https://api.together.xyz/signup), copy your API key on the initial welcome screen, and then hit the play button on any model from the [Together Models list](https://docs.together.ai/docs/serverless-models). Change `~/.continue/config.json` to look like this: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Together Qwen2.5 Coder", - "provider": "together", - "model": "Qwen/Qwen2.5-Coder-32B-Instruct", - "apiKey": "YOUR_API_KEY" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Together Qwen2.5 Coder + provider: together + model: Qwen/Qwen2.5-Coder-32B-Instruct + apiKeySecret: TOGETHER_API_KEY + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Together Qwen2.5 Coder", + "provider": "together", + "model": "Qwen/Qwen2.5-Coder-32B-Instruct", + "apiKey": "YOUR_API_KEY" + } + ] + ``` + + [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Together.ts) diff --git a/docs/docs/customize/model-providers/top-level/deepseek.mdx b/docs/docs/customize/model-providers/top-level/deepseek.mdx index 6698ebbb5..f6c1701f1 100644 --- a/docs/docs/customize/model-providers/top-level/deepseek.mdx +++ b/docs/docs/customize/model-providers/top-level/deepseek.mdx @@ -3,42 +3,66 @@ title: DeepSeek slug: ../deepseek --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + :::info - You can get an API key from the [DeepSeek console](https://www.deepseek.com/). - ::: ## Chat model We recommend configuring **DeepSeek Chat** as your chat model. -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "DeepSeek Chat", - "provider": "deepseek", - "model": "deepseek-chat", - "apiKey": "[API_KEY]" - } - ] -} -``` + + + ```yaml title="config.yaml" + models: + - name: DeepSeek Chat + provider: deepseek + model: deepseek-chat + apiKey: [API_KEY] + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "DeepSeek Chat", + "provider": "deepseek", + "model": "deepseek-chat", + "apiKey": "[API_KEY]" + } + ] + ``` + + ## Autocomplete model We recommend configuring **DeepSeek Coder** as your autocomplete model. -```json title="config.json (Deprecated)" -{ - "tabAutocompleteModel": { - "title": "DeepSeek Coder", - "provider": "deepseek", - "model": "deepseek-coder" - } -} -``` + + + ```yaml title="config.yaml" + models: + - name: DeepSeek Coder + provider: deepseek + model: deepseek-coder + roles: + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" + "tabAutocompleteModel": { + "title": "DeepSeek Coder", + "provider": "deepseek", + "model": "deepseek-coder" + } + ``` + + ## Embeddings model diff --git a/docs/docs/customize/model-providers/top-level/vertexai.mdx b/docs/docs/customize/model-providers/top-level/vertexai.mdx index 5f5eb4fb7..6146e1ce3 100644 --- a/docs/docs/customize/model-providers/top-level/vertexai.mdx +++ b/docs/docs/customize/model-providers/top-level/vertexai.mdx @@ -14,50 +14,90 @@ You need to enable the [Vertex AI API](https://console.cloud.google.com/marketpl We recommend configuring **Claude 3.5 Sonnet** as your chat model. -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Claude 3.5 Sonnet", - "provider": "vertexai", - "model": "claude-3-5-sonnet-20240620", - "projectId": "[PROJECT_ID]", - "region": "us-east5" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Claude 3.5 Sonnet + provider: vertexai + model: claude-3-5-sonnet-20240620 + projectId: [PROJECT_ID] + region: us-east5 + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Claude 3.5 Sonnet", + "provider": "vertexai", + "model": "claude-3-5-sonnet-20240620", + "projectId": "[PROJECT_ID]", + "region": "us-east5" + } + ] + ``` + + ## Autocomplete model We recommend configuring **Codestral** or **code-gecko** as your autocomplete model. -```json title="config.json (Deprecated)" -{ - "tabAutocompleteModel": { - "title": "Codestral (Vertex AI)", - "provider": "vertexai", - "model": "codestral", - "projectId": "[PROJECT_ID]", - "region": "us-central1" - } -} -``` + + + ```yaml title="config.yaml" + models: + - name: Codestral (Vertex AI) + provider: vertexai + model: codestral + projectId: [PROJECT_ID] + region: us-central1 + roles: + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" + "tabAutocompleteModel": { + "title": "Codestral (Vertex AI)", + "provider": "vertexai", + "model": "codestral", + "projectId": "[PROJECT_ID]", + "region": "us-central1" + } + ``` + + ## Embeddings model We recommend configuring **text-embedding-004** as your embeddings model. -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "provider": "vertexai", - "model": "text-embedding-004", - "projectId": "[PROJECT_ID]", - "region": "us-central1" - } -} -``` + + + ```yaml title="config.yaml" + models: + - name: Text Embedding-004 + provider: vertexai + model: text-embedding-004 + projectId: [PROJECT_ID] + region: us-central1 + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "provider": "vertexai", + "model": "text-embedding-004", + "projectId": "[PROJECT_ID]", + "region": "us-central1" + } + ``` + + ## Reranking model diff --git a/docs/docs/customize/model-providers/top-level/xAI.mdx b/docs/docs/customize/model-providers/top-level/xAI.mdx index c9317758b..130ffa775 100644 --- a/docs/docs/customize/model-providers/top-level/xAI.mdx +++ b/docs/docs/customize/model-providers/top-level/xAI.mdx @@ -3,28 +3,40 @@ title: xAI slug: ../xai --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + :::info - You can get an API key from the [xAI console](https://console.x.ai/) - ::: ## Chat model We recommend configuring **grok-beta** as your chat model. -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Grok Beta", - "provider": "xAI", - "model": "grok-beta", - "apiKey": "[API_KEY]" - } - ] -} -``` + + + ```yaml title="config.yaml" + models: + - name: Grok Beta + provider: xAI + model: grok-beta + apiKey: + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Grok Beta", + "provider": "xAI", + "model": "grok-beta", + "apiKey": "[API_KEY]" + } + ] + ``` + + ## Autocomplete model diff --git a/docs/docs/customize/model-types/embeddings.md b/docs/docs/customize/model-types/embeddings.mdx similarity index 100% rename from docs/docs/customize/model-types/embeddings.md rename to docs/docs/customize/model-types/embeddings.mdx diff --git a/docs/docs/customize/model-types/reranking.md b/docs/docs/customize/model-types/reranking.md deleted file mode 100644 index c66445831..000000000 --- a/docs/docs/customize/model-types/reranking.md +++ /dev/null @@ -1,93 +0,0 @@ ---- -title: Reranking model -description: Reranking model -keywords: [rerank] -sidebar_position: 4 ---- - -A "reranking model" is trained to take two pieces of text (often a user question and a document) and return a relevancy score between 0 and 1, estimating how useful the document will be in answering the question. Rerankers are typically much smaller than LLMs, and will be extremely fast and cheap in comparison. - -In Continue, reranking is used by [@Codebase](../deep-dives/codebase.md) in order to select the most relevant code snippets after vector search. - -## Recommended reranking models - -If you have the ability to use any model, we recommend `rerank-2` by Voyage AI, which is listed below along with the rest of the options for rerankers. - -### Voyage AI - -Voyage AI offers the best reranking model for code with their `rerank-2` model. After obtaining an API key from [here](https://www.voyageai.com/), you can configure like this: - -```json title="config.json (Deprecated)" -{ - "reranker": { - "name": "voyage", - "params": { - "model": "rerank-2", - "apiKey": "" - } - } -} -``` - -### Cohere - -See Cohere's documentation for rerankers [here](https://docs.cohere.com/docs/rerank-2). - -```json title="config.json (Deprecated)" -{ - "reranker": { - "name": "cohere", - "params": { - "model": "rerank-english-v3.0", - "apiKey": "" - } - } -} -``` - -### LLM - -If you only have access to a single LLM, then you can use it as a reranker. This is discouraged unless truly necessary, because it will be much more expensive and still less accurate than any of the above models trained specifically for the task. Note that this will not work if you are using a local model, for example with Ollama, because too many parallel requests need to be made. - -```json title="config.json (Deprecated)" -{ - "reranker": { - "name": "llm", - "params": { - "modelTitle": "My Model Title" - } - } -} -``` - -The `"modelTitle"` field must match one of the models in your "models" array in config.json. - -### Text Embeddings Inference - -[Hugging Face Text Embeddings Inference](https://huggingface.co/docs/text-embeddings-inference/en/index) enables you to host your own [reranker endpoint](https://huggingface.github.io/text-embeddings-inference/#/Text%20Embeddings%20Inference/rerank). You can configure your reranker as follows: - -```json title="config.json (Deprecated)" -{ - "reranker": { - "name": "huggingface-tei", - "params": { - "apiBase": "http://localhost:8080", - "apiKey": "", - "truncate": true, - "truncation_direction": "Right" - } - } -} -``` - -### Free Trial (Voyage AI) - -Continue offers a free trial of Voyage AI's reranking model. - -```json title="config.json (Deprecated)" -{ - "reranker": { - "name": "free-trial" - } -} -``` diff --git a/docs/docs/customize/model-types/reranking.mdx b/docs/docs/customize/model-types/reranking.mdx new file mode 100644 index 000000000..ef2622105 --- /dev/null +++ b/docs/docs/customize/model-types/reranking.mdx @@ -0,0 +1,156 @@ +--- +title: Reranking model +description: Reranking model +keywords: [rerank] +sidebar_position: 4 +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +A "reranking model" is trained to take two pieces of text (often a user question and a document) and return a relevancy score between 0 and 1, estimating how useful the document will be in answering the question. Rerankers are typically much smaller than LLMs, and will be extremely fast and cheap in comparison. + +In Continue, reranking is used by [@Codebase](../deep-dives/codebase.md) in order to select the most relevant code snippets after vector search. + +## Recommended reranking models + +If you have the ability to use any model, we recommend `rerank-2` by Voyage AI, which is listed below along with the rest of the options for rerankers. + +### Voyage AI + +Voyage AI offers the best reranking model for code with their `rerank-2` model. After obtaining an API key from [here](https://www.voyageai.com/), you can configure like this: + + + + ```yaml title="config.yaml" + models: + - name: My Voyage Reranker + provider: voyage + apiKey: + model: rerank-2 + roles: + - rerank + ``` + + + ```json title="config.json (Deprecated)" + "reranker": { + "name": "voyage", + "params": { + "model": "rerank-2", + "apiKey": "" + } + } + ``` + + + +### Cohere + +See Cohere's documentation for rerankers [here](https://docs.cohere.com/docs/rerank-2). + + + + ```yaml title="config.yaml" + models: + - name: Cohere Reranker + provider: cohere + model: rerank-english-v3.0 + apiKey: + roles: + - rerank + ``` + + + ```json title="config.json (Deprecated)" + "reranker": { + "name": "cohere", + "params": { + "model": "rerank-english-v3.0", + "apiKey": "" + } + } + ``` + + + +### LLM + +If you only have access to a single LLM, then you can use it as a reranker. This is discouraged unless truly necessary, because it will be much more expensive and still less accurate than any of the above models trained specifically for the task. Note that this will not work if you are using a local model, for example with Ollama, because too many parallel requests need to be made. + + + + ```yaml title="config.yaml" + models: + - name: LLM Reranker + provider: openai + model: gpt-4o + roles: + - rerank + ``` + + + ```json title="config.json (Deprecated)" + "reranker": { + "name": "llm", + "params": { + "modelTitle": "My Model Title" + } + } + ``` + + + +The `"modelTitle"` field must match one of the models in your "models" array in config.json. + +### Text Embeddings Inference + +[Hugging Face Text Embeddings Inference](https://huggingface.co/docs/text-embeddings-inference/en/index) enables you to host your own [reranker endpoint](https://huggingface.github.io/text-embeddings-inference/#/Text%20Embeddings%20Inference/rerank). You can configure your reranker as follows: + + + + ```yaml title="Package or config.yaml" + models: + - name: Huggingface-tei Reranker + provider: huggingface-tei + apiBase: http://localhost:8080 + apiKey: + roles: + - rerank + ``` + + + ```json title="config.json (Deprecated)" + "reranker": { + "name": "huggingface-tei", + "params": { + "apiBase": "http://localhost:8080", + "apiKey": "" + } + } + ``` + + + +### Free Trial (Voyage AI) + +Continue offers a free trial of Voyage AI's reranking model. + + + + ```yaml title="config.yaml" + models: + - name: Free Trial Reranker + provider: free-trial + roles: + - rerank + ``` + + + ```json title="config.json (Deprecated)" + "reranker": { + "name": "free-trial" + } + ``` + + diff --git a/docs/docs/getting-started/install.md b/docs/docs/getting-started/install.md index 3729edbfd..f144a37a1 100644 --- a/docs/docs/getting-started/install.md +++ b/docs/docs/getting-started/install.md @@ -13,7 +13,7 @@ keywords: [install, installation, getting started, vs code, jetbrains] ![move-to-right-sidebar](/img/move-to-right-sidebar.gif) :::info[Troubleshooting] -If you have any problems, see the [troubleshooting guide](troubleshooting.md) or ask for help in [our Discord](https://discord.gg/NWtdYexhMs) +If you have any problems, see the [troubleshooting guide](../troubleshooting.mdx) or ask for help in [our Discord](https://discord.gg/NWtdYexhMs) ::: ## JetBrains @@ -25,5 +25,5 @@ If you have any problems, see the [troubleshooting guide](troubleshooting.md) or ![jetbrains-getting-started.png](/img/jetbrains-getting-started.png) :::info[Troubleshooting] -If you have any problems, see the [troubleshooting guide](troubleshooting.md) or ask for help in [our Discord](https://discord.com/invite/EfJEfdFnDQ) +If you have any problems, see the [troubleshooting guide](../troubleshooting.mdx) or ask for help in [our Discord](https://discord.com/invite/EfJEfdFnDQ) ::: From eed77fbcb59ddd9312b2b6e903ed5f241eb49d6b Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Fri, 17 Jan 2025 17:23:39 -0800 Subject: [PATCH 010/316] clean up some edges with config.json mentions, finish provider docs --- docs/docs/actions/how-it-works.mdx | 2 +- docs/docs/actions/how-to-customize.md | 10 - docs/docs/actions/how-to-use-it.md | 2 +- docs/docs/autocomplete/how-it-works.md | 4 +- docs/docs/autocomplete/how-to-customize.md | 2 +- docs/docs/autocomplete/model-setup.mdx | 6 +- docs/docs/chat/context-selection.md | 2 +- docs/docs/chat/how-it-works.md | 4 +- docs/docs/chat/how-to-customize.md | 6 +- docs/docs/chat/model-setup.mdx | 92 +++---- docs/docs/customize/context-providers.mdx | 10 +- .../customize/deep-dives/autocomplete.mdx | 4 +- docs/docs/customize/deep-dives/codebase.mdx | 4 +- .../customize/deep-dives/configuration.md | 31 ++- docs/docs/customize/deep-dives/docs.md | 2 +- .../model-providers/more/SambaNova.mdx | 35 ++- .../model-providers/more/asksage.mdx | 70 +++--- .../model-providers/more/cerebras.mdx | 35 ++- .../model-providers/more/cloudflare.mdx | 99 +++++--- .../customize/model-providers/more/cohere.mdx | 99 +++++--- .../model-providers/more/deepinfra.mdx | 35 ++- .../model-providers/more/flowise.mdx | 35 ++- .../model-providers/more/free-trial.mdx | 4 +- .../model-providers/more/function-network.mdx | 101 +++++--- .../customize/model-providers/more/groq.mdx | 37 ++- .../more/huggingfaceinferenceapi.mdx | 2 +- .../model-providers/more/ipex_llm.mdx | 69 ++++-- .../customize/model-providers/more/kindo.mdx | 74 ++++-- .../model-providers/more/llamacpp.mdx | 35 ++- .../model-providers/more/llamafile.mdx | 32 ++- .../model-providers/more/lmstudio.mdx | 88 +++++-- .../model-providers/more/moonshot.mdx | 84 ++++--- .../customize/model-providers/more/msty.mdx | 74 ++++-- .../customize/model-providers/more/nebius.mdx | 66 +++-- .../customize/model-providers/more/novita.mdx | 35 ++- .../customize/model-providers/more/nvidia.mdx | 68 ++++-- .../model-providers/more/openrouter.mdx | 79 ++++-- .../model-providers/more/replicatellm.mdx | 35 ++- .../model-providers/more/sagemaker.mdx | 48 ++-- .../model-providers/more/scaleway.mdx | 66 +++-- .../model-providers/more/siliconflow.mdx | 78 ++++-- .../model-providers/more/textgenwebui.mdx | 37 ++- .../model-providers/more/together.mdx | 2 +- .../customize/model-providers/more/vllm.mdx | 103 +++++--- .../model-providers/more/watsonx.mdx | 231 ++++++++++++------ .../model-providers/top-level/anthropic.mdx | 64 +++-- .../model-providers/top-level/azure.mdx | 143 +++++++---- .../model-providers/top-level/bedrock.mdx | 2 - .../model-providers/top-level/deepseek.mdx | 6 +- .../model-providers/top-level/gemini.mdx | 8 +- .../model-providers/top-level/mistral.mdx | 6 +- .../model-providers/top-level/ollama.mdx | 4 +- .../model-providers/top-level/openai.mdx | 12 +- .../model-providers/top-level/vertexai.mdx | 8 +- .../model-providers/top-level/xAI.mdx | 8 +- .../customize/model-types/autocomplete.md | 4 +- docs/docs/customize/model-types/chat.md | 6 +- .../docs/customize/model-types/embeddings.mdx | 107 +++++--- docs/docs/customize/model-types/reranking.mdx | 8 +- docs/docs/customize/overview.md | 28 +-- docs/docs/customize/slash-commands.mdx | 2 +- docs/docs/customize/tools.mdx | 2 +- .../build-your-own-context-provider.md | 6 +- ...custom-code-rag.md => custom-code-rag.mdx} | 46 +++- .../tutorials/how-to-self-host-a-model.md | 76 ------ .../tutorials/how-to-self-host-a-model.mdx | 118 +++++++++ docs/docs/customize/tutorials/llama3.1.md | 134 ---------- docs/docs/customize/tutorials/llama3.1.mdx | 202 +++++++++++++++ .../running-continue-without-internet.md | 2 +- ...t-up-codestral.md => set-up-codestral.mdx} | 46 ++-- docs/docs/edit/how-it-works.md | 2 +- docs/docs/edit/how-to-customize.mdx | 2 +- docs/docs/edit/model-setup.md | 2 +- docs/docs/json-reference.md | 4 +- docs/docs/reference.md | 2 +- docs/docs/telemetry.md | 16 +- docs/docs/troubleshooting.mdx | 2 +- docs/docs/yaml-migration.md | 20 +- 78 files changed, 2007 insertions(+), 1128 deletions(-) rename docs/docs/customize/tutorials/{custom-code-rag.md => custom-code-rag.mdx} (86%) delete mode 100644 docs/docs/customize/tutorials/how-to-self-host-a-model.md create mode 100644 docs/docs/customize/tutorials/how-to-self-host-a-model.mdx delete mode 100644 docs/docs/customize/tutorials/llama3.1.md create mode 100644 docs/docs/customize/tutorials/llama3.1.mdx rename docs/docs/customize/tutorials/{set-up-codestral.md => set-up-codestral.mdx} (59%) diff --git a/docs/docs/actions/how-it-works.mdx b/docs/docs/actions/how-it-works.mdx index 49d2e8db0..afb1b2396 100644 --- a/docs/docs/actions/how-it-works.mdx +++ b/docs/docs/actions/how-it-works.mdx @@ -9,4 +9,4 @@ While many Actions are based on templated prompts and can be customized with .pr Actions that generate inline diffs, like “/edit”, “/comment”, or right click actions, use the same prompt and response processing logic as [Edit](edit/how-it-works). -To learn how other slash commands work, see the full reference [here](../customize/slash-commands). +To learn how other slash commands work, see the full reference [here](../customize/slash-commands.mdx). diff --git a/docs/docs/actions/how-to-customize.md b/docs/docs/actions/how-to-customize.md index 0cd40903a..5bf2d496d 100644 --- a/docs/docs/actions/how-to-customize.md +++ b/docs/docs/actions/how-to-customize.md @@ -18,11 +18,6 @@ There are two ways to add custom slash commands: ### Custom Slash Commands with `config.ts` - - - If you want to go a step further than writing custom commands with natural language, you can write a custom function that returns the response. This requires using `config.ts` instead of `config.json`. To do this, push a new `SlashCommand` object to the `slashCommands` list. This object contains "name", the name that you will type to invoke the slash command, "description", the description seen in the dropdown menu, and "run". The `run` function is any async generator that should yield strings as you want them to be streamed to the UI. As an argument to the function, you have access to a `ContinueSDK` object with utilities such as access to certain information/actions within the IDE, the current language model, and a few other utilities. For example, here is a slash command that generates a commit message: @@ -51,11 +46,6 @@ export function modifyConfig(config: Config): Config { } ``` - - - ## Other custom actions Currently the other action triggers are not open for configuration, but we plan to allow this via .prompt files in the future. - - diff --git a/docs/docs/actions/how-to-use-it.md b/docs/docs/actions/how-to-use-it.md index 80f057453..018a7c941 100644 --- a/docs/docs/actions/how-to-use-it.md +++ b/docs/docs/actions/how-to-use-it.md @@ -18,7 +18,7 @@ The most common way to invoke an action is with a slash command. These are short ![slash-commands](/img/slash-commands.png) -A few of the most useful slash commands are available by default, like “/edit”, “/comment”, and “/share”, but Continue has a large built-in library of other options. To enable these, learn more [here](../customize/slash-commands.md). +A few of the most useful slash commands are available by default, like “/edit”, “/comment”, and “/share”, but Continue has a large built-in library of other options. To enable these, learn more [here](../customize/slash-commands.mdx). ### Prompt files diff --git a/docs/docs/autocomplete/how-it-works.md b/docs/docs/autocomplete/how-it-works.md index 9d87819b3..c97b71c03 100644 --- a/docs/docs/autocomplete/how-it-works.md +++ b/docs/docs/autocomplete/how-it-works.md @@ -16,7 +16,7 @@ In order to display suggestions quickly, without sending too many requests, we d ## Context -As explained on the [context selection](context-selection.md) page, Continue uses a number of retrieval methods to find relevant snippets from your codebase to include in the prompt. +As explained on the [context selection](./context-selection.md) page, Continue uses a number of retrieval methods to find relevant snippets from your codebase to include in the prompt. ## Filtering @@ -28,4 +28,4 @@ Language models aren't perfect, but can be made much closer by adjusting their o We will also occasionally entirely filter out responses if they are bad. This is often due to extreme repetition. -You can learn more about how it works in the [Autocomplete deep dive](../customize/deep-dives/autocomplete.md). +You can learn more about how it works in the [Autocomplete deep dive](../customize/deep-dives/autocomplete.mdx). diff --git a/docs/docs/autocomplete/how-to-customize.md b/docs/docs/autocomplete/how-to-customize.md index 317b09775..8b0fd8d96 100644 --- a/docs/docs/autocomplete/how-to-customize.md +++ b/docs/docs/autocomplete/how-to-customize.md @@ -19,4 +19,4 @@ Continue offers a handful of parameters in [`config.json` (Deprecated)](../json- - `prefixPercentage`: Defines the proportion of the prompt dedicated to the code before the cursor. - `multilineCompletions`: Controls whether suggestions can span multiple lines ("always", "never", or "auto"). -For a comprehensive guide on all configuration options and their impacts, see the [Autocomplete deep dive](../customize/deep-dives/autocomplete.md). +For a comprehensive guide on all configuration options and their impacts, see the [Autocomplete deep dive](../customize/deep-dives/autocomplete.mdx). diff --git a/docs/docs/autocomplete/model-setup.mdx b/docs/docs/autocomplete/model-setup.mdx index e975e51fe..31330d5a9 100644 --- a/docs/docs/autocomplete/model-setup.mdx +++ b/docs/docs/autocomplete/model-setup.mdx @@ -23,7 +23,7 @@ For the best Autocomplete experience, we recommend using Codestral through the [ - name: Codestral provider: mistral model: codestral-latest - apiKey: YOUR_API_KEY + apiKey: CODESTRAL_API_KEY roles: - autocomplete ``` @@ -46,7 +46,7 @@ The API keys for Codestral and the general Mistral APIs are different. If you ar ## Local, offline / self-hosted experience -For those preferring local execution or self-hosting,`Qwen2.5-Coder 1.5B` offers a good balance of performance and quality for most users (e.g. using [Ollama](../customize/model-providers/top-level/ollama.md) or [LM Studio](../customize/model-providers/more/lmstudio.md)). +For those preferring local execution or self-hosting,`Qwen2.5-Coder 1.5B` offers a good balance of performance and quality for most users (e.g. using [Ollama](../customize/model-providers/top-level/ollama.mdx) or [LM Studio](../customize/model-providers/more/lmstudio.mdx)). @@ -110,4 +110,4 @@ When using a remote instance you need to set the `"apiBase"` value in the config ## Other experiences -There are many more models and providers you can use with Autocomplete. Check them out [here](../customize/model-types/autocomplete.md). You can also see more examples of Autocomplete configuration [here](../customize/deep-dives/autocomplete.md) +There are many more models and providers you can use with Autocomplete. Check them out [here](../customize/model-types/autocomplete.md). You can also see more examples of Autocomplete configuration [here](../customize/deep-dives/autocomplete.mdx) diff --git a/docs/docs/chat/context-selection.md b/docs/docs/chat/context-selection.md index e32ea3c51..f93a6a93e 100644 --- a/docs/docs/chat/context-selection.md +++ b/docs/docs/chat/context-selection.md @@ -27,7 +27,7 @@ You can include a folder in your current workspace as context by typing [`@Folde ## Codebase search -You can automatically include relevant files from your codebase as context by typing [`@Codebase`](../customize/context-providers.mdx#codebase). You can learn about how @Codebase works [here](../customize/deep-dives/codebase.md). +You can automatically include relevant files from your codebase as context by typing [`@Codebase`](../customize/context-providers.mdx#codebase). You can learn about how @Codebase works [here](../customize/deep-dives/codebase.mdx). ## Documentation site diff --git a/docs/docs/chat/how-it-works.md b/docs/docs/chat/how-it-works.md index 84c81582e..e799e0a07 100644 --- a/docs/docs/chat/how-it-works.md +++ b/docs/docs/chat/how-it-works.md @@ -9,6 +9,6 @@ Using any selected code sections, all context that you have selected with @, and The model response is then streamed directly back to the sidebar. Each code section included in the response will be placed into its own code block, which gives you buttons to either “Apply to current file”, “Insert at cursor”, or “Copy” for each section. When you press cmd/ctrl + L (VS Code) or cmd/ctrl + J (JetBrains) at the end of a session, all context is cleared and a new session is started, so that you can begin a new task. -If you would like to view the exact prompt that is sent to the model during Chat, you can [view this in the prompt logs](troubleshooting.md#llm-prompt-logs). +If you would like to view the exact prompt that is sent to the model during Chat, you can [view this in the prompt logs](troubleshooting.mdx#llm-prompt-logs). -You can learn more about how `@Codebase` works [here](../customize/deep-dives/codebase.md) and `@Docs` [here](../customize/deep-dives/docs.md). +You can learn more about how `@Codebase` works [here](../customize/deep-dives/codebase.mdx) and `@Docs` [here](../customize/deep-dives/docs.md). diff --git a/docs/docs/chat/how-to-customize.md b/docs/docs/chat/how-to-customize.md index ee26a6a84..b375d6b1d 100644 --- a/docs/docs/chat/how-to-customize.md +++ b/docs/docs/chat/how-to-customize.md @@ -8,8 +8,8 @@ sidebar_position: 5 There are a number of different ways to customize Chat - You can add a [`.continuerules`](../customize/deep-dives/rules.md) file to the root of your project to customize the system prompt -- You can configure [`@Codebase`](../customize/deep-dives/codebase.md) -- You can create your own [custom code RAG](../customize/tutorials/custom-code-rag.md) +- You can configure [`@Codebase`](../customize/deep-dives/codebase.mdx) +- You can create your own [custom code RAG](../customize/tutorials/custom-code-rag.mdx) - You can configure [`@Docs`](../customize/deep-dives/docs.md) - You can [build your own context provider](../customize/tutorials/build-your-own-context-provider.md) -- You can configure and create custom [tools](../customize/tools.md) +- You can configure and create custom [tools](../customize/tools.mdx) diff --git a/docs/docs/chat/model-setup.mdx b/docs/docs/chat/model-setup.mdx index 9bdb09c7c..371696597 100644 --- a/docs/docs/chat/model-setup.mdx +++ b/docs/docs/chat/model-setup.mdx @@ -18,16 +18,16 @@ For the best overall Chat experience, you will want to use a 400B+ parameter mod ### Claude Sonnet 3.5 from Anthropic -Our current top recommendation is Claude Sonnet 3.5 from [Anthropic](../customize/model-providers/top-level/anthropic.md). +Our current top recommendation is Claude Sonnet 3.5 from [Anthropic](../customize/model-providers/top-level/anthropic.mdx). ```yaml title="Package or config.yaml" models: - - title: Claude 3.5 Sonnet + - name: Claude 3.5 Sonnet provider: anthropic model: claude-3-5-sonnet-latest - apiKeySecret: ANTHROPIC_API_KEY + apiKey: ${{ secrets.ANTHROPIC_API_KEY }} ``` @@ -46,7 +46,7 @@ Our current top recommendation is Claude Sonnet 3.5 from [Anthropic](../customiz ### Llama 3.1 405B from Meta -If you prefer to use an open-weight model, then Llama 3.1 405B from Meta is your best option right now. You will need to decide if you use it through a SaaS model provider (e.g. [Together](../customize/model-providers/more/together.md) or [Groq](../customize/model-providers/more/groq.md)) or self-host it (e.g. using [vLLM](../customize/model-providers//more/vllm.md) or [Ollama](../customize/model-providers/top-level/ollama.md)). +If you prefer to use an open-weight model, then Llama 3.1 405B from Meta is your best option right now. You will need to decide if you use it through a SaaS model provider (e.g. [Together](../customize/model-providers/more/together.mdx) or [Groq](../customize/model-providers/more/groq.mdx)) or self-host it (e.g. using [vLLM](../customize/model-providers//more/vllm.mdx) or [Ollama](../customize/model-providers/top-level/ollama.mdx)). @@ -54,35 +54,35 @@ If you prefer to use an open-weight model, then Llama 3.1 405B from Meta is your ```yaml title="Package or config.yaml" models: - - title: "Llama 3.1 405B" - provider: "together" - model: "llama3.1-405b" - apiKeySecret: "TOGETHER_API_KEY" + - name: "Llama 3.1 405B" + provider: "together" + model: "llama3.1-405b" + apiKey: ${{ secrets.TOGETHER_API_KEY }} ``` ```yaml title="Package or config.yaml" models: - - title: "Llama 3.1 405B" - provider: "groq" - model: "llama3.1-405b" - apiKeySecret: "GROQ_API_KEY" + - name: "Llama 3.1 405B" + provider: "groq" + model: "llama3.1-405b" + apiKey: ${{ secrets.GROQ_API_KEY }} ``` ```yaml title="Package or config.yaml" models: - - title: "Llama 3.1 405B" - provider: "vllm" - model: "llama3.1-405b" + - name: "Llama 3.1 405B" + provider: "vllm" + model: "llama3.1-405b" ``` ```yaml title="Package or config.yaml" models: - - title: "Llama 3.1 405B" - provider: "ollama" - model: "llama3.1:405b" + - name: "Llama 3.1 405B" + provider: "ollama" + model: "llama3.1:405b" ``` @@ -141,16 +141,16 @@ If you prefer to use an open-weight model, then Llama 3.1 405B from Meta is your ### GPT-4o from OpenAI -If you prefer to use a model from [OpenAI](../customize/model-providers/top-level/openai.md), then we recommend GPT-4o. +If you prefer to use a model from [OpenAI](../customize/model-providers/top-level/openai.mdx), then we recommend GPT-4o. ```yaml title="Package or config.yaml" models: - - title: GPT-4o - provider: openai - model: '' - apiKey: [OPENAI_API_KEY] + - name: GPT-4o + provider: openai + model: '' + apiKey: ${{ secrets.OPENAI_API_KEY }} ``` @@ -169,28 +169,28 @@ If you prefer to use a model from [OpenAI](../customize/model-providers/top-leve ### Gemini 1.5 Pro from Google -If you prefer to use a model from [Google](../customize/model-providers/top-level/gemini.md), then we recommend Gemini 1.5 Pro. +If you prefer to use a model from [Google](../customize/model-providers/top-level/gemini.mdx), then we recommend Gemini 1.5 Pro. ```yaml title="Package or config.yaml" models: - - title: Gemini 1.5 Pro + - name: Gemini 1.5 Pro provider: gemini model: gemini-1.5-pro-latest - apiKey: [GEMINI_API_KEY] + apiKey: ${{ secrets.GEMINI_API_KEY }} ``` ```json title="config.json (Deprecated)" - "models": [ + "models": [ { - "title": "Gemini 1.5 Pro", - "provider": "gemini", - "model": "gemini-1.5-pro-latest", - "apiKey": "[GEMINI_API_KEY]" + "title": "Gemini 1.5 Pro", + "provider": "gemini", + "model": "gemini-1.5-pro-latest", + "apiKey": "[GEMINI_API_KEY]" } - ] + ] ``` @@ -201,7 +201,7 @@ For the best local, offline Chat experience, you will want to use a model that i ### Llama 3.1 8B -If your local machine can run an 8B parameter model, then we recommend running Llama 3.1 8B on your machine (e.g. using [Ollama](../customize/model-providers/top-level/ollama.md) or [LM Studio](../customize/model-providers/more/lmstudio.md)). +If your local machine can run an 8B parameter model, then we recommend running Llama 3.1 8B on your machine (e.g. using [Ollama](../customize/model-providers/top-level/ollama.mdx) or [LM Studio](../customize/model-providers/more/lmstudio.mdx)). @@ -209,17 +209,17 @@ If your local machine can run an 8B parameter model, then we recommend running L ```yaml title="Package or config.yaml" models: - - title: Llama 3.1 8B - provider: ollama - model: llama3.1:8b + - name: Llama 3.1 8B + provider: ollama + model: llama3.1:8b ``` ```yaml title="Package or config.yaml" models: - - title: Llama 3.1 8B - provider: lmstudio - model: llama3.1:8b + - name: Llama 3.1 8B + provider: lmstudio + model: llama3.1:8b ``` @@ -254,7 +254,7 @@ If your local machine can run an 8B parameter model, then we recommend running L ### DeepSeek Coder 2 16B -If your local machine can run a 16B parameter model, then we recommend running DeepSeek Coder 2 16B (e.g. using [Ollama](../customize/model-providers/top-level/ollama.md) or [LM Studio](../customize/model-providers/more/lmstudio.md)). +If your local machine can run a 16B parameter model, then we recommend running DeepSeek Coder 2 16B (e.g. using [Ollama](../customize/model-providers/top-level/ollama.mdx) or [LM Studio](../customize/model-providers/more/lmstudio.mdx)). @@ -262,17 +262,17 @@ If your local machine can run a 16B parameter model, then we recommend running D ```yaml title="Package or config.yaml" models: - - title: DeepSeek Coder 2 16B - provider: ollama - model: deepseek-coder-v2:16b + - name: DeepSeek Coder 2 16B + provider: ollama + model: deepseek-coder-v2:16b ``` ```yaml title="Package or config.yaml" models: - - title: DeepSeek Coder 2 16B - provider: lmstudio - model: deepseek-coder-v2:16b + - name: DeepSeek Coder 2 16B + provider: lmstudio + model: deepseek-coder-v2:16b ``` diff --git a/docs/docs/customize/context-providers.mdx b/docs/docs/customize/context-providers.mdx index 667b055f9..cd7c5a5e7 100644 --- a/docs/docs/customize/context-providers.mdx +++ b/docs/docs/customize/context-providers.mdx @@ -15,7 +15,7 @@ As an example, say you are working on solving a new GitHub Issue. You type '@Iss ## Built-in Context Providers -To use any of the built-in context providers, open `config.json` and add it to the `contextProviders` list. +You can add any built-in context-providers in your config file as shown below: ### `@File` @@ -151,7 +151,7 @@ Reference the contents from any documentation site. Note that this will only enable the `@Docs` context provider. -To use it, you need to add a documentation site to your `config.json`. See the [docs](../customize/deep-dives/docs.md) page for more information. +To use it, you need to add a documentation site to your config file. See the [docs](../customize/deep-dives/docs.md) page for more information. ### `@Open` @@ -231,7 +231,7 @@ Reference the most relevant snippets from your codebase. -Read more about indexing and retrieval [here](../customize/deep-dives/codebase.md). +Read more about indexing and retrieval [here](../customize/deep-dives/codebase.mdx). ### `@Folder` @@ -279,8 +279,6 @@ Reference the results of codebase search, just like the results you would get fr This context provider is powered by [ripgrep](https://github.com/BurntSushi/ripgrep). -This context provider is powered by [ripgrep](https://github.com/BurntSushi/ripgrep). - ### `@Url` Reference the markdown converted contents of a given URL. @@ -492,7 +490,7 @@ You'll then be able to type "@" and see "MCP" in the context providers dropdown. ### Prompt Files -See [Prompt Files](/customize/deep-dives/prompt-files). Prompt files are not added directly to the config file; prompt files are parsed and injected into the config automatically, to be used like other context providers. +See [Prompt Files](/customize/deep-dives/prompt-file.mdx). Prompt files are not added directly to the config file; prompt files are parsed and injected into the config automatically, to be used like other context providers. ### `@Issue` diff --git a/docs/docs/customize/deep-dives/autocomplete.mdx b/docs/docs/customize/deep-dives/autocomplete.mdx index 5dba5d800..d6d3755ef 100644 --- a/docs/docs/customize/deep-dives/autocomplete.mdx +++ b/docs/docs/customize/deep-dives/autocomplete.mdx @@ -8,7 +8,7 @@ import TabItem from "@theme/TabItem"; ### Setting up with Codestral (recommended) -If you want to have the best autocomplete experience, we recommend using Codestral, which is available through the [Mistral API](https://console.mistral.ai/). To do this, obtain an API key and add it to your `config.json`: +If you want to have the best autocomplete experience, we recommend using Codestral, which is available through the [Mistral API](https://console.mistral.ai/). To do this, obtain an API key and add it to your config: @@ -17,7 +17,7 @@ If you want to have the best autocomplete experience, we recommend using Codestr - name: Codestral provider: mistral model: codestral-latest - apiKeySecret: CODESTRAL_API_KEY + apiKey: ${{ secrets.CODESTRAL_API_KEY }} roles: - autocomplete ``` diff --git a/docs/docs/customize/deep-dives/codebase.mdx b/docs/docs/customize/deep-dives/codebase.mdx index 994cb848d..dfed9cda9 100644 --- a/docs/docs/customize/deep-dives/codebase.mdx +++ b/docs/docs/customize/deep-dives/codebase.mdx @@ -11,7 +11,7 @@ import TabItem from "@theme/TabItem"; Continue indexes your codebase so that it can later automatically pull in the most relevant context from throughout your workspace. This is done via a combination of embeddings-based retrieval and keyword search. By default, all embeddings are calculated locally using `transformers.js` and stored locally in `~/.continue/index`. :::info[`transformers.js cannot be used in JetBrains`] -Currently, `transformers.js` cannot be used in JetBrains IDEs. However, you can select a differet embeddings model from [the list here](../model-types/embeddings.md). +Currently, `transformers.js` cannot be used in JetBrains IDEs. However, you can select a differet embeddings model from [the list here](../model-types/embeddings.mdx). ::: Currently, the codebase retrieval feature is available as the "codebase" and "folder" context providers. You can use them by typing `@Codebase` or `@Folder` in the input box, and then asking a question. The contents of the input box will be compared with the embeddings from the rest of the codebase (or folder) to determine relevant files. @@ -41,7 +41,7 @@ Here are use cases where it is not useful: ## Configuration -There are a few options that let you configure the behavior of the codebase context provider. These can be set in `config.json`, and are the same for the codebase, docs, and folder context providers: +There are a few options that let you configure the behavior of the `@codebase` context provider, which are the same for the `@folder` context provider: diff --git a/docs/docs/customize/deep-dives/configuration.md b/docs/docs/customize/deep-dives/configuration.md index 6182807d6..504bf4d09 100644 --- a/docs/docs/customize/deep-dives/configuration.md +++ b/docs/docs/customize/deep-dives/configuration.md @@ -5,27 +5,32 @@ keywords: [config, settings, customize] # Configuration -Continue can be deeply customized. User-level configuration is stored and can be edited in your home directory in [`config.json`](#configjson): +## YAML Config -- `~/.continue/config.json` (MacOS / Linux) -- `%USERPROFILE%\.continue\config.json` (Windows) +Continue can be deeply customized. User-level configuration is stored and can be edited in your home directory in `config.yaml`: -To open `config.json`, you can click the "gear" icon in the bottom right corner of the Continue Chat sidebar. When editing this file, you can see the available options suggested as you type, or check the reference below. +- `~/.continue/config.yaml` (MacOS / Linux) +- `%USERPROFILE%\.continue\config.yaml` (Windows) -When you save `config.json`, Continue will automatically refresh to take into account your changes. `config.json` is automatically created the first time you use Continue. `config.json` is automatically generated if it doesn't exist. +To open your configuration file, you can click the "gear" icon in the bottom right corner of the Continue Chat sidebar. When editing this file, you can see the available options suggested as you type, or check the reference below. -In the vast majority of cases, you will only need to edit `config.json`. However, Continue offers two additional ways to customize configuration: +When you save a config file from the IDE, Continue will automatically refresh to take into account your changes. A config file is automatically created the first time you use Continue, and always automatically generated with default values if it doesn't exist. -- [`.continuerc.json`](#continuercjson) - Workspace-level configuration. If you'd like to scope certain settings to a particular workspace, you can add a `.continuerc.json` to the root of your project. This can be set to merge with _or_ override the user-level `config.json` +See the full reference for `config.yaml` [here](../../reference.md). + +## Deprecated configuration methods + +:::info +View the `config.json` migration guide [here](../../yaml-migration.md) +::: + +- [`config.json`](../../json-reference.md) - The original configuration format which is stored in a file at the same location as `config.yaml` +- [`.continuerc.json`](#continuercjson) - Workspace-level configuration - [`config.ts`](#configts) - Advanced configuration (probably unnecessary) - a TypeScript file in your home directory that can be used to programmatically modify (_merged_) the `config.json` schema: - `~/.continue/config.ts` (MacOS / Linux) - `%USERPROFILE%\.continue\config.ts` (Windows) -## `config.json` - -See the full reference for `config.json` [here](../../json-reference.md). - -## `.continuerc.json` +### `.continuerc.json` The format of `.continuerc.json` is the same as `config.json`, plus one _additional_ property `mergeBehavior`, which can be set to either "merge" or "overwrite". If set to "merge" (the default), `.continuerc.json` will be applied on top of `config.json` (arrays and objects are merged). If set to "overwrite", then every top-level property of `.continuerc.json` will overwrite that property from `config.json`. @@ -40,7 +45,7 @@ Example } ``` -## `config.ts` +### `config.ts` To programatically extend `config.json`, you can place a `config.ts` script in same directory as `config.json` and export a `modifyConfig` function, like: diff --git a/docs/docs/customize/deep-dives/docs.md b/docs/docs/customize/deep-dives/docs.md index e519f3d30..79d2735b3 100644 --- a/docs/docs/customize/deep-dives/docs.md +++ b/docs/docs/customize/deep-dives/docs.md @@ -71,7 +71,7 @@ The [configuration schema for docs](https://github.com/continuedev/continue/blob ## Configuration -As with [@Codebase context provider configuration](https://docs.continue.dev/customize/deep-dives/codebase#configuration), you can adjust the behavior of the docs context provider with the `nRetrieve`, `nFinal`, and `useReranking` +As with [@Codebase context provider configuration](../deep-dives/codebase.mdx#configuration), you can adjust the behavior of the docs context provider with the `nRetrieve`, `nFinal`, and `useReranking` ```json title="config.json (Deprecated)" { diff --git a/docs/docs/customize/model-providers/more/SambaNova.mdx b/docs/docs/customize/model-providers/more/SambaNova.mdx index ffaf4b53d..31147e252 100644 --- a/docs/docs/customize/model-providers/more/SambaNova.mdx +++ b/docs/docs/customize/model-providers/more/SambaNova.mdx @@ -5,17 +5,28 @@ import TabItem from "@theme/TabItem"; The SambaNova Cloud is a cloud platform for running large AI models with the world record Llama 3.1 70B/405B performance. You can follow the instructions in [this blog post](https://sambanova.ai/blog/accelerating-coding-with-sambanova-cloud?ref=blog.continue.dev) to configure your setup. -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "SambaNova Llama 3.1 405B", - "provider": "sambanova", - "model": "llama3.1-405b", - "apiKey": "YOUR_API_KEY" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: SambaNova Llama 3.1 405B + provider: sambanova + model: llama3.1-405b + apiKey: ${{ secrets.SAMBANOVA_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "SambaNova Llama 3.1 405B", + "provider": "sambanova", + "model": "llama3.1-405b", + "apiKey": "SAMBANOVA_API_KEY" + } + ] + ``` + + [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/SambaNova.ts) diff --git a/docs/docs/customize/model-providers/more/asksage.mdx b/docs/docs/customize/model-providers/more/asksage.mdx index fcccdd750..eb8608e88 100644 --- a/docs/docs/customize/model-providers/more/asksage.mdx +++ b/docs/docs/customize/model-providers/more/asksage.mdx @@ -9,21 +9,33 @@ To get an Ask Sage API key login to the Ask Sage platform (If you don't have an ## Configuration -To use the Ask Sage models, the following configuration is required to the `config.json` file: +To use the Ask Sage models, you can use the following -```json title="config.json (Deprecated)" -{ + + + ```yaml title="Package or config.yaml" + models: + - name: GPT-4 gov + provider: askSage + apiKey: ${{ secrets.ASK_SAGE_API_KEY }} + apiBase: https://api.asksage.ai/server/ + model: gpt4-gov + ``` + + + ```json title="config.json (Deprecated)" "models": [ { "apiKey": "YOUR_API_KEY", - "apiBase": "https://api.asksage.ai/server/", // apiBase will be the same for all models, but will vary based on tenant. + "apiBase": "https://api.asksage.ai/server/", "model": "gpt4-gov", "title": "GPT-4 gov", "provider": "askSage" } ] -} -``` + ``` + + The `apiBase` will be listed on the Ask Sage platform when you generate an `API key`. You will see context as shown below: @@ -51,26 +63,26 @@ Ask Sage documentation is not available with Continue.Dev, so if you have any qu The current Models available provided by Ask Sage are: -| Index | Model | Added | Status | -| ----- | --------------------- | ----- | ------ | -| 1 | GPT-4 Gov | Yes | ✅ | -| 2 | GPT-4o Gov | Yes | ✅ | -| 3 | GPT-4o-mini Gov | Yes | ✅ | -| 4 | GPT-3.5-Turbo Gov | Yes | ✅ | -| 5 | GPT-4o | Yes | ✅ | -| 6 | GPT-4o-mini | Yes | ✅ | -| 7 | GPT-4 | Yes | ✅ | -| 8 | GPT-4-32K | Yes | ✅ | -| 9 | GPT-o1 | Yes | ✅ | -| 10 | GPT-o1-mini | Yes | ✅ | -| 11 | GPT-3.5-turbo | Yes | ✅ | -| 12 | Calude 3.5 Sonnet Gov | Yes | ✅ | -| 13 | Calude 3 Opus | Yes | ✅ | -| 14 | Calude 3 Sonet | Yes | ✅ | -| 15 | Calude 3.5 Sonnet | Yes | ✅ | -| 16 | Grok (xAI) | Yes | ✅ | -| 17 | Groq Llama 3.3 | Yes | ✅ | -| 18 | Groq 70B | Yes | ✅ | -| 19 | Gemini Pro | Yes | ✅ | -| 20 | llama 3 | Yes | ✅ | -| 21 | Mistral Large | Yes | ✅ | +| Index | Model | Added | +| ----- | --------------------- | ----- | +| 1 | GPT-4 Gov | ✅ | +| 2 | GPT-4o Gov | ✅ | +| 3 | GPT-4o-mini Gov | ✅ | +| 4 | GPT-3.5-Turbo Gov | ✅ | +| 5 | GPT-4o | ✅ | +| 6 | GPT-4o-mini | ✅ | +| 7 | GPT-4 | ✅ | +| 8 | GPT-4-32K | ✅ | +| 9 | GPT-o1 | ✅ | +| 10 | GPT-o1-mini | ✅ | +| 11 | GPT-3.5-turbo | ✅ | +| 12 | Calude 3.5 Sonnet Gov | ✅ | +| 13 | Calude 3 Opus | ✅ | +| 14 | Calude 3 Sonet | ✅ | +| 15 | Calude 3.5 Sonnet | ✅ | +| 16 | Grok (xAI) | ✅ | +| 17 | Groq Llama 3.3 | ✅ | +| 18 | Groq 70B | ✅ | +| 19 | Gemini Pro | ✅ | +| 20 | llama 3 | ✅ | +| 21 | Mistral Large | ✅ | diff --git a/docs/docs/customize/model-providers/more/cerebras.mdx b/docs/docs/customize/model-providers/more/cerebras.mdx index f9ccb88cc..9375c974f 100644 --- a/docs/docs/customize/model-providers/more/cerebras.mdx +++ b/docs/docs/customize/model-providers/more/cerebras.mdx @@ -9,15 +9,26 @@ Cerebras Inference uses specialized silicon to provides fast inference. 2. Create and copy the API key for use in Continue. 3. Update your Continue config file: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Cerebras Llama 3.1 70B", - "provider": "cerebras", - "model": "llama3.1-70b", - "apiKey": "YOUR_API_KEY" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Cerebras Llama 3.1 70B + provider: cerebras + model: llama3.1-70b + apiKey: ${{ secrets.CEREBRAS_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Cerebras Llama 3.1 70B", + "provider": "cerebras", + "model": "llama3.1-70b", + "apiKey": "YOUR_API_KEY" + } + ] + ``` + + diff --git a/docs/docs/customize/model-providers/more/cloudflare.mdx b/docs/docs/customize/model-providers/more/cloudflare.mdx index 7d3058548..5388e2a6a 100644 --- a/docs/docs/customize/model-providers/more/cloudflare.mdx +++ b/docs/docs/customize/model-providers/more/cloudflare.mdx @@ -3,44 +3,77 @@ import TabItem from "@theme/TabItem"; # Cloudflare Workers AI -Cloudflare Workers AI can be used for both chat and tab autocompletion in Continue. To setup Cloudflare Workers AI, add the following to your `config.json` file: +Cloudflare Workers AI can be used for both chat and tab autocompletion in Continue. Here is an example of Cloudflare Workers AI configuration: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "accountId": "YOUR CLOUDFLARE ACCOUNT ID", - "apiKey": "YOUR CLOUDFLARE API KEY", - "contextLength": 2400, - "completionOptions": { - "maxTokens": 500 + + + ```yaml title="config.yaml" + models: + - name: Llama 3 8B + provider: cloudflare + accountId: YOUR CLOUDFLARE ACCOUNT ID + apiKey: ${{ secrets.CLOUDFARE_API_KEY }} + model: "@cf/meta/llama-3-8b-instruct" + contextLength: 2400 + defaultCompletionOptions: + maxTokens: 500 + roles: + - chat + - name: DeepSeek Coder 6.7b Instruct + provider: cloudflare + accountId: YOUR CLOUDFLARE ACCOUNT ID + apiKey: ${{ secrets.CLOUDFARE_API_KEY }} + model: "@hf/thebloke/deepseek-coder-6.7b-instruct-awq" + contextLength: 2400 + defaultCompletionOptions: + maxTokens: 500 + roles: + - chat + - name: DeepSeek 7b + provider: cloudflare + accountId: YOUR CLOUDFLARE ACCOUNT ID + apiKey: ${{ secrets.CLOUDFARE_API_KEY }} + model: "@hf/thebloke/deepseek-coder-6.7b-base-awq" + roles: + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama 3 8B", + "provider": "cloudflare", + "accountId": "YOUR CLOUDFLARE ACCOUNT ID", + "apiKey": "YOUR CLOUDFLARE API KEY", + "contextLength": 2400, + "completionOptions": { + "maxTokens": 500 + }, + "model": "@cf/meta/llama-3-8b-instruct" }, - "model": "@cf/meta/llama-3-8b-instruct", // This can be the name of any model supported by Workers AI - "provider": "cloudflare", - "title": "Llama 3 8B" - }, - { - "accountId": "YOUR CLOUDFLARE ACCOUNT ID", - "apiKey": "YOUR CLOUDFLARE API KEY", - "contextLength": 2400, - "completionOptions": { - "maxTokens": 500 - }, - "model": "@hf/thebloke/deepseek-coder-6.7b-instruct-awq", - "provider": "cloudflare", - "title": "DeepSeek Coder 6.7b Instruct" - } - ... + { + "title": "DeepSeek Coder 6.7b Instruct", + "provider": "cloudflare", + "accountId": "YOUR CLOUDFLARE ACCOUNT ID", + "apiKey": "YOUR CLOUDFLARE API KEY", + "contextLength": 2400, + "completionOptions": { + "maxTokens": 500 + }, + "model": "@hf/thebloke/deepseek-coder-6.7b-instruct-awq" + } + ], "tabAutocompleteModel": { + "title": "DeepSeek 7b", + "provider": "cloudflare", "accountId": "YOUR CLOUDFLARE ACCOUNT ID", "apiKey": "YOUR CLOUDFLARE API KEY", - "model": "@hf/thebloke/deepseek-coder-6.7b-base-awq", - "provider": "cloudflare", - "title": "DeepSeek 7b" - }, - ] -} -``` + "model": "@hf/thebloke/deepseek-coder-6.7b-base-awq" + } + ``` + + Visit the [Cloudflare dashboard](https://dash.cloudflare.com/) to [create an API key](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). diff --git a/docs/docs/customize/model-providers/more/cohere.mdx b/docs/docs/customize/model-providers/more/cohere.mdx index dcdd39b01..966964f53 100644 --- a/docs/docs/customize/model-providers/more/cohere.mdx +++ b/docs/docs/customize/model-providers/more/cohere.mdx @@ -9,18 +9,29 @@ Before using Cohere, visit the [Cohere dashboard](https://dashboard.cohere.com/a We recommend configuring **Command-R Plus** as your chat model. -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Cohere", - "provider": "cohere", - "model": "command-r-plus", - "apiKey": "YOUR_API_KEY" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Cohere + provider: cohere + model: command-r-plus + apiKey: ${{ secrets.COHERE_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Cohere", + "provider": "cohere", + "model": "command-r-plus", + "apiKey": "YOUR_API_KEY" + } + ] + ``` + + ## Autocomplete model @@ -32,28 +43,54 @@ Cohere currently does not offer any autocomplete models. We recommend configuring **embed-english-v3.0** as your embeddings model. -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "provider": "cohere", - "model": "embed-english-v3.0", - "apiKey": "" - } -} -``` + + + ```yaml title="config.yaml" + models: + - name: Cohere Embed + provider: cohere + model: embed-english-v3.0 + apiKey: ${{ secrets.COHERE_API_KEY }} + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "provider": "cohere", + "model": "embed-english-v3.0", + "apiKey": "" + } + ``` + + ## Reranking model We recommend configuring **rerank-english-v3.0** as your reranking model. -```json title="config.json (Deprecated)" -{ - "reranker": { - "name": "cohere", - "params": { - "model": "rerank-english-v3.0", - "apiKey": "" + + + ```yaml title="config.yaml" + models: + - name: Cohere Reranker + provider: cohere + model: rerank-english-v3.0 + apiKey: ${{ secrets.COHERE_API_KEY }} + roles: + - rerank + ``` + + + ```json title="config.json (Deprecated)" + "reranker": { + "name": "cohere", + "params": { + "model": "rerank-english-v3.0", + "apiKey": "" + } } - } -} -``` + ``` + + diff --git a/docs/docs/customize/model-providers/more/deepinfra.mdx b/docs/docs/customize/model-providers/more/deepinfra.mdx index 418ff15f9..51e3943e7 100644 --- a/docs/docs/customize/model-providers/more/deepinfra.mdx +++ b/docs/docs/customize/model-providers/more/deepinfra.mdx @@ -5,17 +5,28 @@ import TabItem from "@theme/TabItem"; [DeepInfra](https://deepinfra.com) provides inference for open-source models at very low cost. To get started with DeepInfra, obtain your API key [here](https://deepinfra.com/dash). Then, find the model you want to use [here](https://deepinfra.com/models?type=text-generation) and copy the name of the model. Continue can then be configured to use the `DeepInfra` LLM class, like the example here: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "provider": "deepinfra", - "title": "DeepInfra", - "model": "mistralai/Mixtral-8x7B-Instruct-v0.1", - "apiKey": "" - } - ] -} -``` + + + ```yaml title="config.yaml" + models: + - name: DeepInfra + provider: deepinfra + model: mistralai/Mixtral-8x7B-Instruct-v0.1 + apiKey: ${{ secrets.DEEP_INFRA_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "provider": "deepinfra", + "title": "DeepInfra", + "model": "mistralai/Mixtral-8x7B-Instruct-v0.1", + "apiKey": "" + } + ] + ``` + + [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/DeepInfra.ts) diff --git a/docs/docs/customize/model-providers/more/flowise.mdx b/docs/docs/customize/model-providers/more/flowise.mdx index 91516ee12..d6abf9ee5 100644 --- a/docs/docs/customize/model-providers/more/flowise.mdx +++ b/docs/docs/customize/model-providers/more/flowise.mdx @@ -5,17 +5,28 @@ import TabItem from "@theme/TabItem"; [Flowise](https://flowiseai.com/) is a low-code/no-code drag & drop tool with the aim to make it easy for people to visualize and build LLM apps. Continue can then be configured to use the `Flowise` LLM class, like the example here: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "provider": "flowise", - "title": "Flowise", - "model": "", - "apiBase": "" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Flowise + provider: flowise + model: + apiBase: + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "provider": "flowise", + "title": "Flowise", + "model": "", + "apiBase": "" + } + ] + ``` + + [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Flowise.ts) diff --git a/docs/docs/customize/model-providers/more/free-trial.mdx b/docs/docs/customize/model-providers/more/free-trial.mdx index b5fd710f8..ddc16d5e4 100644 --- a/docs/docs/customize/model-providers/more/free-trial.mdx +++ b/docs/docs/customize/model-providers/more/free-trial.mdx @@ -10,8 +10,8 @@ The `"free-trial"` provider lets new users quickly try out the best experience i While the Continue extension is always free to use, we cannot support infinite free LLM usage for all of our users. You will eventually need to either: -1. Select an open-source model to use for free [locally](../top-level/ollama.md), or -2. Add your own API key for [Anthropic](../top-level/anthropic.md) or [another LLM provider](/customize/model-providers) +1. Select an open-source model to use for free [locally](../top-level/ollama.mdx), or +2. Add your own API key for [Anthropic](../top-level/anthropic.mdx) or [another LLM provider](../../model-providers/) ## FAQ about the trial diff --git a/docs/docs/customize/model-providers/more/function-network.mdx b/docs/docs/customize/model-providers/more/function-network.mdx index b48f80f97..751fdccb6 100644 --- a/docs/docs/customize/model-providers/more/function-network.mdx +++ b/docs/docs/customize/model-providers/more/function-network.mdx @@ -20,18 +20,31 @@ To get an API key, login to the Function Network Developer Platform. If you don' Function Network supports a number of models for chat. We recommend using LLama 3.1 70b or Qwen2.5-Coder-32B-Instruct. -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Llama 3.1 70b", - "provider": "function-network", - "model": "meta/llama-3.1-70b-instruct", - "apiKey": "YOUR_API_KEY" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Llama 3.1 70b + provider: function-network + model: meta/llama-3.1-70b-instruct + apiKey: ${{ secrets.FUNCTION_NETWORK_API_KEY }} + roles: + - chat + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama 3.1 70b", + "provider": "function-network", + "model": "meta/llama-3.1-70b-instruct", + "apiKey": "YOUR_API_KEY" + } + ] + ``` + + [Click here](https://docs.function.network/models-supported/chat-and-code-completion) to see a list of chat model providers. @@ -39,30 +52,56 @@ Function Network supports a number of models for chat. We recommend using LLama Function Network supports a number of models for autocomplete. We recommend using Llama 3.1 8b or Qwen2.5-Coder-1.5B. -```json title="config.json (Deprecated)" -{ - "tabAutocompleteModel": { - "title": "Deepseek Coder 6.7b", - "provider": "function-network", - "model": "thebloke/deepseek-coder-6.7b-base-awq", - "apiKey": "YOUR_API_KEY" - } -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Deepseek Coder 6.7b + provider: function-network + model: thebloke/deepseek-coder-6.7b-base-awq + apiKey: ${{ secrets.FUNCTION_NETWORK_API_KEY }} + roles: + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" + "tabAutocompleteModel": { + "title": "Deepseek Coder 6.7b", + "provider": "function-network", + "model": "thebloke/deepseek-coder-6.7b-base-awq", + "apiKey": "YOUR_API_KEY" + } + ``` + + ## Embeddings model Function Network supports a number of models for embeddings. We recommend using baai/bge-base-en-v1.5. -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "provider": "function-network", - "model": "baai/bge-base-en-v1.5", - "apiKey": "YOUR_API_KEY" - } -} -``` + + + ```yaml title="config.yaml" + models: + - name: BGE Base En + provider: function-network + model: baai/bge-base-en-v1.5 + apiKey: ${{ secrets.FUNCTION_NETWORK_API_KEY }} + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "provider": "function-network", + "model": "baai/bge-base-en-v1.5", + "apiKey": "YOUR_API_KEY" + } + ``` + + [Click here](https://docs.function.network/models-supported/embeddings) to see a list of embeddings model providers. diff --git a/docs/docs/customize/model-providers/more/groq.mdx b/docs/docs/customize/model-providers/more/groq.mdx index 13f9bbc87..4282b1293 100644 --- a/docs/docs/customize/model-providers/more/groq.mdx +++ b/docs/docs/customize/model-providers/more/groq.mdx @@ -8,15 +8,28 @@ Groq provides the fastest available inference for open-source language models, i 1. Obtain an API key [here](https://console.groq.com/keys) 2. Update your Continue config file like this: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Llama 3.1 405b", - "provider": "groq", - "model": "llama3.1-405b", - "apiKey": "" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Llama 3.1 405b + provider: groq + model: llama3.1-405b + apiKey: ${{ secrets.GROQ_API_KEY }} + roles: + - chat + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama 3.1 405b", + "provider": "groq", + "model": "llama3.1-405b", + "apiKey": "" + } + ] + ``` + + diff --git a/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx b/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx index ae08459e0..08b60c1cc 100644 --- a/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx +++ b/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx @@ -12,7 +12,7 @@ Hugging Face Inference Endpoints are an easy way to setup instances of open-sour - name: Hugging Face Inference API provider: huggingface-inference-api model: MODEL_NAME - apiKeySecret: HF_TOKEN + apiKey: ${{ secrets.HF_API_KEY }} apiBase: HF_URL_BASE ``` diff --git a/docs/docs/customize/model-providers/more/ipex_llm.mdx b/docs/docs/customize/model-providers/more/ipex_llm.mdx index c711a81ac..2413aa6ce 100644 --- a/docs/docs/customize/model-providers/more/ipex_llm.mdx +++ b/docs/docs/customize/model-providers/more/ipex_llm.mdx @@ -9,35 +9,54 @@ import TabItem from "@theme/TabItem"; IPEX-LLM supports accelerated Ollama backend to be hosted on Intel GPU. Refer to [this guide](https://ipex-llm.readthedocs.io/en/latest/doc/LLM/Quickstart/ollama_quickstart.html) from IPEX-LLM official documentation about how to install and run Ollama serve accelerated by IPEX-LLM on Intel GPU. You can then configure Continue to use the IPEX-LLM accelerated `"ollama"` provider as follows: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "IPEX-LLM", - "provider": "ollama", - "model": "AUTODETECT" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: IPEX-LLM + provider: ollama + model: AUTODETECT + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "IPEX-LLM", + "provider": "ollama", + "model": "AUTODETECT" + } + ] + ``` + + If you would like to reach the Ollama service from another machine, make sure you set or export the environment variable `OLLAMA_HOST=0.0.0.0` before executing the command `ollama serve`. Then, in the Continue configuration, set `'apiBase'` to correspond with the IP address / port of the remote machine. That is, Continue can be configured to be: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "IPEX-LLM", - "provider": "ollama", - "model": "AUTODETECT", - "apiBase": "http://your-ollama-service-ip:11434" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: IPEX-LLM + provider: ollama + model: AUTODETECT + apiBase: http://your-ollama-service-ip:11434 + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "IPEX-LLM", + "provider": "ollama", + "model": "AUTODETECT", + "apiBase": "http://your-ollama-service-ip:11434" + } + ] + ``` + + :::tip - If you would like to preload the model before your first conversation with that model in Continue, you could refer to [here](https://ipex-llm.readthedocs.io/en/latest/doc/LLM/Quickstart/continue_quickstart.html#pull-and-prepare-the-model) for more information. - ::: diff --git a/docs/docs/customize/model-providers/more/kindo.mdx b/docs/docs/customize/model-providers/more/kindo.mdx index 745ec3019..cb0c87922 100644 --- a/docs/docs/customize/model-providers/more/kindo.mdx +++ b/docs/docs/customize/model-providers/more/kindo.mdx @@ -7,34 +7,58 @@ Kindo offers centralized control over your organization's AI operations, ensurin ## Config Example -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Claude 3.5 Sonnet", - "provider": "kindo", - "model": "claude-3-5-sonnet", - "apiKey": "" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Claude 3.5 Sonnet + provider: kindo + model: claude-3-5-sonnet + apiKey: ${{ secrets.KINDO_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Claude 3.5 Sonnet", + "provider": "kindo", + "model": "claude-3-5-sonnet", + "apiKey": "" + } + ] + ``` + + ## Tab Autocomplete Config Example -```json title="config.json (Deprecated)" -{ - "tabAutocompleteModel": [ - { - "title": "WhiteRabbitNeo", - "provider": "kindo", - "model": "/models/WhiteRabbitNeo-33B-DeepSeekCoder", - "apiKey": "", - "template": "none" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: WhiteRabbitNeo + provider: kindo + model: /models/WhiteRabbitNeo-33B-DeepSeekCoder + apiKey: ${{ secrets.KINDO_API_KEY }} + roles: + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" + "tabAutocompleteModel": [ + { + "title": "WhiteRabbitNeo", + "provider": "kindo", + "model": "/models/WhiteRabbitNeo-33B-DeepSeekCoder", + "apiKey": "", + "template": "none" + } + ] + ``` + + ## Security diff --git a/docs/docs/customize/model-providers/more/llamacpp.mdx b/docs/docs/customize/model-providers/more/llamacpp.mdx index 12f2264d8..b8d43a830 100644 --- a/docs/docs/customize/model-providers/more/llamacpp.mdx +++ b/docs/docs/customize/model-providers/more/llamacpp.mdx @@ -11,17 +11,28 @@ Run the llama.cpp server binary to start the API server. If running on a remote After it's up and running, change `~/.continue/config.json` to look like this: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Llama CPP", - "provider": "llama.cpp", - "model": "MODEL_NAME", - "apiBase": "http://localhost:8080" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Llama CPP + provider: llama.cpp + model: MODEL_NAME + apiBase: http://localhost:8080 + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama CPP", + "provider": "llama.cpp", + "model": "MODEL_NAME", + "apiBase": "http://localhost:8080" + } + ] + ``` + + [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/LlamaCpp.ts) diff --git a/docs/docs/customize/model-providers/more/llamafile.mdx b/docs/docs/customize/model-providers/more/llamafile.mdx index 58df64c23..4563bf630 100644 --- a/docs/docs/customize/model-providers/more/llamafile.mdx +++ b/docs/docs/customize/model-providers/more/llamafile.mdx @@ -5,16 +5,26 @@ import TabItem from "@theme/TabItem"; A [llamafile](https://github.com/Mozilla-Ocho/llamafile#readme) is a self-contained binary that can run an open-source LLM. You can configure this provider in your config.json as follows: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Llamafile", - "provider": "llamafile", - "model": "mistral-7b" - } - ] -} -``` + + + ```yaml title="config.yaml" + models: + - name: Llamafile + provider: llamafile + model: mistral-7b + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llamafile", + "provider": "llamafile", + "model": "mistral-7b" + } + ] + ``` + + [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Llamafile.ts) diff --git a/docs/docs/customize/model-providers/more/lmstudio.mdx b/docs/docs/customize/model-providers/more/lmstudio.mdx index 6bca26aa9..b3d5d31b2 100644 --- a/docs/docs/customize/model-providers/more/lmstudio.mdx +++ b/docs/docs/customize/model-providers/more/lmstudio.mdx @@ -5,43 +5,77 @@ import TabItem from "@theme/TabItem"; [LM Studio](https://lmstudio.ai) is an application for Mac, Windows, and Linux that makes it easy to locally run open-source models and comes with a great UI. To get started with LM Studio, download from the website, use the UI to download a model, and then start the local inference server. Continue can then be configured to use the `LMStudio` LLM class: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "LM Studio", - "provider": "lmstudio", - "model": "llama2-7b" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: LM Studio + provider: lmstudio + model: llama2-7b + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "LM Studio", + "provider": "lmstudio", + "model": "llama2-7b" + } + ] + ``` + + ### Embeddings model LMStudio supports embeddings endpoints, and comes with the `nomic-ai/nomic-embed-text-v1.5-GGUF` model (as of Nov 2024, check your models) -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "provider": "lmstudio", - "model": "nomic-ai/nomic-embed-text-v1.5-GGUF" - } -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Nomic Embed Text + provider: lmstudio + model: nomic-ai/nomic-embed-text-v1.5-GGUF + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "provider": "lmstudio", + "model": "nomic-ai/nomic-embed-text-v1.5-GGUF" + } + ``` + + ## Setting up a remote instance To configure a remote instance of LM Studio, add the `"apiBase"` property to your model in config.json: -```json title="config.json (Deprecated)" -{ - "title": "LM Studio", - "model": "codestral", - "provider": "lmstudio", - "apiBase": "http://x.x.x.x:1234/v1/" -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Nomic Embed Text + provider: lmstudio + model: nomic-ai/nomic-embed-text-v1.5-GGUF + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "provider": "lmstudio", + "model": "nomic-ai/nomic-embed-text-v1.5-GGUF" + } + ``` + + This `apiBase` will now be used instead of the default `http://localhost:1234/v1`. diff --git a/docs/docs/customize/model-providers/more/moonshot.mdx b/docs/docs/customize/model-providers/more/moonshot.mdx index 0a6f5381e..e9e9d4f1a 100644 --- a/docs/docs/customize/model-providers/more/moonshot.mdx +++ b/docs/docs/customize/model-providers/more/moonshot.mdx @@ -10,20 +10,31 @@ import TabItem from "@theme/TabItem"; To use Moonshot AI models, you need to: 1. Get an API key from [Moonshot AI Platform](https://platform.moonshot.cn/) -2. Add the following configuration to your `config.json`: +2. Add the following configuration: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Moonshot", - "provider": "moonshot", - "model": "moonshot-v1-8k", - "apiKey": "YOUR_API_KEY" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Moonshot + provider: moonshot + model: moonshot-v1-8k + apiKey: apiKey: ${{ secrets.MOONSHOT_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Moonshot", + "provider": "moonshot", + "model": "moonshot-v1-8k", + "apiKey": "YOUR_API_KEY" + } + ] + ``` + + ## Available Models @@ -45,20 +56,35 @@ Moonshot AI currently provides the following models: Here's a complete configuration example: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Moonshot-8K", - "provider": "moonshot", - "model": "moonshot-v1-8k", - "apiKey": "YOUR_API_KEY", - "completionOptions": { - "temperature": 0.7, - "topP": 0.95, - "maxTokens": 2048 + + + ```yaml title="Package or config.yaml" + models: + - name: Moonshot-8K + provider: moonshot + model: moonshot-v1-8k + apiKey: apiKey: ${{ secrets.MOONSHOT_API_KEY }} + defaultCompletionOptions: + temperature: 0.7 + topP: 0.95 + maxTokens: 2048 + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Moonshot-8K", + "provider": "moonshot", + "model": "moonshot-v1-8k", + "apiKey": "YOUR_API_KEY", + "completionOptions": { + "temperature": 0.7, + "topP": 0.95, + "maxTokens": 2048 + } } - } - ] -} -``` + ] + ``` + + diff --git a/docs/docs/customize/model-providers/more/msty.mdx b/docs/docs/customize/model-providers/more/msty.mdx index 77d9a1056..b741a314d 100644 --- a/docs/docs/customize/model-providers/more/msty.mdx +++ b/docs/docs/customize/model-providers/more/msty.mdx @@ -5,18 +5,27 @@ import TabItem from "@theme/TabItem"; [Msty](https://msty.app/) is an application for Windows, Mac, and Linux that makes it really easy to run online as well as local open-source models, including Llama-2, DeepSeek Coder, etc. No need to fidget with your terminal, run a command, or anything. Just download the app from the website, click a button, and you are up and running. Continue can then be configured to use the `Msty` LLM class: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Msty", - "provider": "msty", - "model": "deepseek-coder:6.7b", - "completionOptions": {} - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Msty + provider: msty + model: deepseek-coder:6.7b + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Msty", + "provider": "msty", + "model": "deepseek-coder:6.7b", + } + ] + ``` + + ## Completion Options @@ -33,21 +42,34 @@ In addition to the model type, you can also configure some of the parameters tha If you need to send custom headers for authentication, you may use the `requestOptions.headers` property like this: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Msty", - "provider": "msty", - "model": "deepseek-coder:6.7b", - "requestOptions": { - "headers": { - "Authorization": "Bearer xxx" + + + ```yaml title="Package or config.yaml" + models: + - name: Msty + provider: msty + model: deepseek-coder:6.7b + requestOptions: + headers: + Authorization: Bearer xxx + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Msty", + "provider": "msty", + "model": "deepseek-coder:6.7b", + "requestOptions": { + "headers": { + "Authorization": "Bearer xxx" + } } } - } - ] -} -``` + ] + ``` + + [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Msty.ts) diff --git a/docs/docs/customize/model-providers/more/nebius.mdx b/docs/docs/customize/model-providers/more/nebius.mdx index ec32edd23..5c010d38c 100644 --- a/docs/docs/customize/model-providers/more/nebius.mdx +++ b/docs/docs/customize/model-providers/more/nebius.mdx @@ -11,29 +11,53 @@ Available models can be found on the [Nebius AI Studio models page](https://stud ## Chat model -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Llama 3.1 405b", - "provider": "nebius", - "model": "llama3.1-405b", - "apiKey": "[API_KEY]" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Llama 3.1 405b + provider: nebius + model: llama3.1-405b + apiKey: ${{ secrets.NEBIUS_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama 3.1 405b", + "provider": "nebius", + "model": "llama3.1-405b", + "apiKey": "[API_KEY]" + } + ] + ``` + + ## Embeddings model Available models can be found on the [Nebius AI Studio embeddings page](https://studio.nebius.ai/models/embedding) -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "provider": "nebius", - "model": "BAAI/bge-en-icl", - "apiKey": "[API_KEY]" - } -} -``` + + + ```yaml title="config.yaml" + models: + - name: BAAI Embedder + provider: nebius + model: BAAI/bge-en-icl + apiKey: ${{ secrets.NEBIUS_API_KEY }} + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "provider": "nebius", + "model": "BAAI/bge-en-icl", + "apiKey": "[API_KEY]" + } + ``` + + diff --git a/docs/docs/customize/model-providers/more/novita.mdx b/docs/docs/customize/model-providers/more/novita.mdx index 799a4cf62..1fb2b2644 100644 --- a/docs/docs/customize/model-providers/more/novita.mdx +++ b/docs/docs/customize/model-providers/more/novita.mdx @@ -5,17 +5,28 @@ import TabItem from "@theme/TabItem"; [Novita AI](https://novita.ai?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link) offers an affordable, reliable, and simple inference platform with scalable [LLM API](https://novita.ai/docs/model-api/reference/introduction.html), empowering developers to build AI applications. Try the [Novita AI Llama 3 API Demo](https://novita.ai/model-api/product/llm-api/playground/meta-llama-llama-3.1-70b-instruct?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link) today!. You can sign up [here](https://novita.ai/user/login?&redirect=/&utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link), copy your API key on the [Key Management](https://novita.ai/settings/key-management?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link), and then hit the play button on any model from the [Novita AI Models list](https://novita.ai/llm-api?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link). Change `~/.continue/config.json` to look like this: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Llama 3.1 8B", - "provider": "novita", - "model": "meta-llama/llama-3.1-8b-instruct", - "apiKey": "YOUR_API_KEY" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Llama 3.1 8B + provider: novita + model: meta-llama/llama-3.1-8b-instruct + apiKey: ${{ secrets.NOVITA_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama 3.1 8B", + "provider": "novita", + "model": "meta-llama/llama-3.1-8b-instruct", + "apiKey": "YOUR_API_KEY" + } + ] + ``` + + [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Novita.ts) diff --git a/docs/docs/customize/model-providers/more/nvidia.mdx b/docs/docs/customize/model-providers/more/nvidia.mdx index fde522cea..b60c99a4e 100644 --- a/docs/docs/customize/model-providers/more/nvidia.mdx +++ b/docs/docs/customize/model-providers/more/nvidia.mdx @@ -13,18 +13,29 @@ import TabItem from "@theme/TabItem"; We recommend configuring **Nemotron-4-340B-Instruct** as your chat model. -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Nemotron-4-340B-Instruct", - "provider": "nvidia", - "model": "nvidia-nemotron-4-340b-instruct", - "apiKey": "[API_KEY]" - } - ] -} -``` + + + ```yaml title="config.yaml" + models: + - name: Nemotron-4-340B-Instruct + provider: nvidia + model: nvidia-nemotron-4-340b-instruct + apiKey: ${{ secrets.NVIDIA_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Nemotron-4-340B-Instruct", + "provider": "nvidia", + "model": "nvidia-nemotron-4-340b-instruct", + "apiKey": "[API_KEY]" + } + ] + ``` + + ## Autocomplete model @@ -36,18 +47,31 @@ NVIDIA currently does not offer any autocomplete models. We recommend configuring **NVIDIA Retrieval QA Mistral 7B** as your embeddings model. -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "provider": "nvidia", - "model": "nvidia/nv-embedqa-mistral-7b-v2", - "apiKey": "[API_KEY]" - } -} -``` + + + ```yaml title="config.yaml" + models: + - name: Nvidia Embedder + provider: nvidia + model: nvidia/nv-embedqa-mistral-7b-v2 + apiKey: ${{ secrets.NVIDIA_API_KEY }} + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "provider": "nvidia", + "model": "nvidia/nv-embedqa-mistral-7b-v2", + "apiKey": "[API_KEY]" + } + ``` + + ## Reranking model NVIDIA currently does not offer any reranking models. -[Click here](../../model-types/reranking.md) to see a list of reranking model providers. +[Click here](../../model-types/reranking.mdx) to see a list of reranking model providers. diff --git a/docs/docs/customize/model-providers/more/openrouter.mdx b/docs/docs/customize/model-providers/more/openrouter.mdx index 7f01c463a..c112cda36 100644 --- a/docs/docs/customize/model-providers/more/openrouter.mdx +++ b/docs/docs/customize/model-providers/more/openrouter.mdx @@ -7,37 +7,64 @@ OpenRouter is a unified interface for commercial and open-source models, giving Change `~/.continue/config.json` to look like the following. -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "OpenRouter LLaMA 70 8B", - "provider": "openrouter", - "model": "meta-llama/llama-3-70b-instruct", - "apiBase": "https://openrouter.ai/api/v1", - "apiKey": "..." - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: OpenRouter LLaMA 70 8B + provider: openrouter + model: meta-llama/llama-3-70b-instruct + apiBase: https://openrouter.ai/api/v1 + apiKey: ${{ secrets.OPEN_ROUTER_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "OpenRouter LLaMA 70 8B", + "provider": "openrouter", + "model": "meta-llama/llama-3-70b-instruct", + "apiBase": "https://openrouter.ai/api/v1", + "apiKey": "" + } + ] + ``` + + To utilize features such as provider preferences or model routing configuration, include these parameters inside the `models[].requestsOptions.extraBodyProperties` field of your plugin config. For example, to prevent extra long prompts from being compressed, you can explicitly turn off the feature like so: -```json title="config.json (Deprecated)" -{ - "models": [ - { - ... - "requestOptions": { - "extraBodyProperties": { - "transforms": [] + + + ```yaml title="Package or config.yaml" + models: + - name: Example Model + provider: exampleProvider + model: example-model + requestOptions: + extraBodyProperties: + transforms: [] + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Example Model", + "provider": "exampleProvider", + "model": "example-model", + "requestOptions": { + "extraBodyProperties": { + "transforms": [] + } + } } - } - } - ] -} -``` + ] + ``` + + Learn more about available settings [here](https://openrouter.ai/docs). diff --git a/docs/docs/customize/model-providers/more/replicatellm.mdx b/docs/docs/customize/model-providers/more/replicatellm.mdx index c87b152a3..f226b082e 100644 --- a/docs/docs/customize/model-providers/more/replicatellm.mdx +++ b/docs/docs/customize/model-providers/more/replicatellm.mdx @@ -5,18 +5,29 @@ import TabItem from "@theme/TabItem"; Replicate is a great option for newly released language models or models that you've deployed through their platform. Sign up for an account [here](https://replicate.ai/), copy your API key, and then select any model from the [Replicate Streaming List](https://replicate.com/collections/streaming-language-models). Change `~/.continue/config.json` to look like this: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Replicate CodeLLama", - "provider": "replicate", - "model": "codellama-13b", - "apiKey": "YOUR_API_KEY" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Replicate CodeLLama + provider: replicate + model: codellama-13b + apiKey: ${{ secrets.REPLICATE_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Replicate CodeLLama", + "provider": "replicate", + "model": "codellama-13b", + "apiKey": "REPLICATE_API_KEY" + } + ] + ``` + + If you don't specify the `model` parameter, it will default to `replicate/llama-2-70b-chat:58d078176e02c219e11eb4da5a02a7830a283b14cf8f94537af893ccff5ee781`. diff --git a/docs/docs/customize/model-providers/more/sagemaker.mdx b/docs/docs/customize/model-providers/more/sagemaker.mdx index c39b5bc7f..9a25b3990 100644 --- a/docs/docs/customize/model-providers/more/sagemaker.mdx +++ b/docs/docs/customize/model-providers/more/sagemaker.mdx @@ -5,24 +5,42 @@ import TabItem from "@theme/TabItem"; SageMaker can be used for both chat and embedding models. Chat models are supported for endpoints deployed with [LMI](https://docs.djl.ai/docs/serving/serving/docs/lmi/index.html), and embedding models are supported for endpoints deployed with [HuggingFace TEI](https://huggingface.co/blog/sagemaker-huggingface-embedding) -To setup SageMaker as a chat model provider, add the following to your `config.json` file: +Here is an example Sagemaker configuration setup: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "deepseek-6.7b-instruct", + + + ```yaml title="config.yaml" + models: + - name: deepseek-6.7b-instruct + provider: sagemaker + model: lmi-model-deepseek-coder-xxxxxxx + region: us-west-2 + roles: + - chat + - name: mxbai-embed + provider: sagemaker + model: mxbai-embed-large-v1-endpoint + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "deepseek-6.7b-instruct", + "provider": "sagemaker", + "model": "lmi-model-deepseek-coder-xxxxxxx", + "region": "us-west-2" + } + ], + "embeddingsProvider": { "provider": "sagemaker", - "model": "lmi-model-deepseek-coder-xxxxxxx", - "region": "us-west-2" + "model": "mxbai-embed-large-v1-endpoint" } - ], - "embeddingsProvider": { - "provider": "sagemaker", - "model": "mxbai-embed-large-v1-endpoint" - } -} -``` + ``` + + The value in model should be the SageMaker endpoint name you deployed. diff --git a/docs/docs/customize/model-providers/more/scaleway.mdx b/docs/docs/customize/model-providers/more/scaleway.mdx index 3f0d8ac54..46681134b 100644 --- a/docs/docs/customize/model-providers/more/scaleway.mdx +++ b/docs/docs/customize/model-providers/more/scaleway.mdx @@ -16,18 +16,29 @@ Read the [quickstart documentation here](https://www.scaleway.com/en/docs/ai-dat We recommend configuring **Qwen2.5-Coder-32B-Instruct** as your chat model. [Click here](https://www.scaleway.com/en/docs/ai-data/generative-apis/reference-content/supported-models/) to see the list of available chat models. -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Qwen2.5-Coder-32B-Instruct", - "provider": "scaleway", - "model": "qwen2.5-coder-32b-instruct", - "apiKey": "[API_KEY]" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Qwen2.5-Coder-32B-Instruct + provider: scaleway + model: qwen2.5-coder-32b-instruct + apiKey: ${{ secrets.SCALEWAY_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Qwen2.5-Coder-32B-Instruct", + "provider": "scaleway", + "model": "qwen2.5-coder-32b-instruct", + "apiKey": "[API_KEY]" + } + ] + ``` + + ## Autocomplete model @@ -39,12 +50,25 @@ Scaleway currently does not offer any autocomplete models. We recommend configuring **BGE-Multilingual-Gemma2** as your embeddings model. -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "provider": "scaleway", - "model": "bge-multilingual-gemma2", - "apiKey": "[API_KEY]" - } -} -``` + + + ```yaml title="config.yaml" + models: + - name: BGE Multilingual Gemma2 + provider: scaleway + model: bge-multilingual-gemma2 + apiKey: ${{ secrets.SCALEWAY_API_KEY }} + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "provider": "scaleway", + "model": "bge-multilingual-gemma2", + "apiKey": "[API_KEY]" + } + ``` + + diff --git a/docs/docs/customize/model-providers/more/siliconflow.mdx b/docs/docs/customize/model-providers/more/siliconflow.mdx index d5814d567..2dba25ec8 100644 --- a/docs/docs/customize/model-providers/more/siliconflow.mdx +++ b/docs/docs/customize/model-providers/more/siliconflow.mdx @@ -13,33 +13,67 @@ You can get an API key from the [Silicon Cloud](https://cloud.siliconflow.cn/acc We recommend configuring **Qwen/Qwen2.5-Coder-32B-Instruct** as your chat model. -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Qwen", - "provider": "siliconflow", - "model": "Qwen/Qwen2.5-Coder-32B-Instruct", - "apiKey": "[API_KEY]" - } - ] -} -``` + + + ```yaml title="config.yaml" + models: + - name: Qwen + provider: siliconflow + model: Qwen/Qwen2.5-Coder-32B-Instruct + apiKey: ${{ secrets.SILICONFLOW_API_KEY }} + roles: + - chat + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Qwen", + "provider": "siliconflow", + "model": "Qwen/Qwen2.5-Coder-32B-Instruct", + "apiKey": "[API_KEY]" + } + ] + ``` + + ## Autocomplete model We recommend configuring **Qwen/Qwen2.5-Coder-7B-Instruct** as your autocomplete model. -```json title="config.json (Deprecated)" -{ - "tabAutocompleteModel": { - "title": "Qwen", - "provider": "siliconflow", - "model": "Qwen/Qwen2.5-Coder-7B-Instruct", - "apiKey": "[API_KEY]" - } -} -``` + + + ```yaml title="config.yaml" + models: + - name: Qwen + provider: siliconflow + model: Qwen/Qwen2.5-Coder-32B-Instruct + apiKey: ${{ secrets.SILICONFLOW_API_KEY }} + roles: + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Qwen", + "provider": "siliconflow", + "model": "Qwen/Qwen2.5-Coder-32B-Instruct", + "apiKey": "[API_KEY]" + } + ] + "tabAutocompleteModel": { + "title": "Qwen", + "provider": "siliconflow", + "model": "Qwen/Qwen2.5-Coder-7B-Instruct", + "apiKey": "[API_KEY]" + } + ``` + + ## Embeddings model diff --git a/docs/docs/customize/model-providers/more/textgenwebui.mdx b/docs/docs/customize/model-providers/more/textgenwebui.mdx index ea9c626b5..a61230bf2 100644 --- a/docs/docs/customize/model-providers/more/textgenwebui.mdx +++ b/docs/docs/customize/model-providers/more/textgenwebui.mdx @@ -3,17 +3,28 @@ import TabItem from "@theme/TabItem"; # TextGenWebUI -TextGenWebUI is a comprehensive, open-source language model UI and local server. You can set it up with an OpenAI-compatible server plugin, and then configure it in your `config.json` like this: +TextGenWebUI is a comprehensive, open-source language model UI and local server. You can set it up with an OpenAI-compatible server plugin, and then configure it like this: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Text Generation WebUI", - "provider": "text-gen-webui", - "apiBase": "http://localhost:5000/v1", - "model": "MODEL_NAME" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Text Generation WebUI + provider: text-gen-webui + apiBase: http://localhost:5000/v1 + model: MODEL_NAME + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Text Generation WebUI", + "provider": "text-gen-webui", + "apiBase": "http://localhost:5000/v1", + "model": "MODEL_NAME" + } + ] + ``` + + diff --git a/docs/docs/customize/model-providers/more/together.mdx b/docs/docs/customize/model-providers/more/together.mdx index 095005bf5..2e776da1c 100644 --- a/docs/docs/customize/model-providers/more/together.mdx +++ b/docs/docs/customize/model-providers/more/together.mdx @@ -12,7 +12,7 @@ The Together API is a cloud platform for running large AI models. You can sign u - name: Together Qwen2.5 Coder provider: together model: Qwen/Qwen2.5-Coder-32B-Instruct - apiKeySecret: TOGETHER_API_KEY + apiKey: ${{ secrets.TOGETHER_API_KEY }} ``` diff --git a/docs/docs/customize/model-providers/more/vllm.mdx b/docs/docs/customize/model-providers/more/vllm.mdx index 3bbf89707..ec962347a 100644 --- a/docs/docs/customize/model-providers/more/vllm.mdx +++ b/docs/docs/customize/model-providers/more/vllm.mdx @@ -13,50 +13,87 @@ vllm serve meta-llama/Meta-Llama-3.1-8B-Instruct We recommend configuring **Llama3.1 8B** as your chat model. -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Llama3.1 8B Instruct", - "provider": "vllm", - "model": "meta-llama/Meta-Llama-3.1-8B-Instruct", - "apiBase": "http:///v1" - } - ] -} -``` + + + ```yaml title="config.yaml" + models: + - name: Llama3.1 8B Instruct + provider: vllm + model: meta-llama/Meta-Llama-3.1-8B-Instruct + apiBase: http:///v1 + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama3.1 8B Instruct", + "provider": "vllm", + "model": "meta-llama/Meta-Llama-3.1-8B-Instruct", + "apiBase": "http:///v1" + } + ] + ``` + + ## Autocomplete model We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model. -```json title="config.json (Deprecated)" -{ - "tabAutocompleteModel": { - "title": "Qwen2.5-Coder 1.5B", - "provider": "vllm", - "model": "Qwen/Qwen2.5-Coder-1.5B" - "apiBase": "http:///v1" - } -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Qwen2.5-Coder 1.5B + provider: vllm + model: Qwen/Qwen2.5-Coder-1.5B + apiBase: http:///v1 + roles: + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" + "tabAutocompleteModel": { + "title": "Qwen2.5-Coder 1.5B", + "provider": "vllm", + "model": "Qwen/Qwen2.5-Coder-1.5B", + "apiBase": "http:///v1" + } + ``` + + ## Embeddings model We recommend configuring **Nomic Embed Text** as your embeddings model. -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "provider": "vllm", - "model": "nomic-ai/nomic-embed-text-v1" - "apiBase": "http:///v1" - } -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: VLLM Nomad Embed Text + provider: vllm + model: nomic-ai/nomic-embed-text-v1 + apiBase: http:///v1 + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "provider": "vllm", + "model": "nomic-ai/nomic-embed-text-v1", + "apiBase": "http:///v1" + } + ``` + + ## Reranking model -[Click here](../../model-types/reranking.md) to see a list of reranking model providers. +[Click here](../../model-types/reranking.mdx) to see a list of reranking model providers. -The continue implementation uses [OpenAI](../top-level/openai.md) under the hood. [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Vllm.ts) +The continue implementation uses [OpenAI](../top-level/openai.mdx) under the hood. [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Vllm.ts) diff --git a/docs/docs/customize/model-providers/more/watsonx.mdx b/docs/docs/customize/model-providers/more/watsonx.mdx index 428e7f0d3..f468af6e1 100644 --- a/docs/docs/customize/model-providers/more/watsonx.mdx +++ b/docs/docs/customize/model-providers/more/watsonx.mdx @@ -41,100 +41,184 @@ To authenticate to your watsonx.ai Software instance with Continue, you can use ## Configuration -Add the following configuration to your `config.json` file to use the watsonx provider. +Add the following configuration: -```json title="~/.continue/config.json" -{ - "models": [ - { - "model": "model ID", - "title": "watsonx - Model Name", - "provider": "watsonx", - "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com", - "projectId": "PROJECT_ID", - "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", - "apiVersion": "2024-03-14" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: watsonx - Model Name + provider: watsonx + model: model ID + apiBase: https://us-south.ml.cloud.ibm.com + projectId: PROJECT_ID + apiKey: API_KEY/ZENAPI_KEY/USERNAME:PASSWORD + apiVersion: 2024-03-14 + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "model": "model ID", + "title": "watsonx - Model Name", + "provider": "watsonx", + "apiBase": "https://us-south.ml.cloud.ibm.com", + "projectId": "PROJECT_ID", + "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", + "apiVersion": "2024-03-14" + } + ] + ``` + + `apiVersion` is optional and defaults to the latest version. If you are using a custom deployment endpoint, set `deploymentID` to the model's deployment ID. You can find it in the watsonx.ai Prompt Lab UI by selecting the corresponding model and opening the `` tab on the right, which will display the endpoint's URL containing the deployment ID. -```json title="~/.continue/config.json" -{ - "models": [ - { - "model": "model ID", - "title": "watsonx - Model Name", - "provider": "watsonx", - "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com", - "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", - "apiVersion": "2024-03-14", - "deploymentId": "DEPLOYMENT_ID" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: watsonx - Model Name + provider: watsonx + model: model ID + apiBase: watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com + apiKey: API_KEY/ZENAPI_KEY/USERNAME:PASSWORD + apiVersion: 2024-03-14 + deploymentId: DEPLOYMENT_ID + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "model": "model ID", + "title": "watsonx - Model Name", + "provider": "watsonx", + "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com", + "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", + "apiVersion": "2024-03-14", + "deploymentId": "DEPLOYMENT_ID" + } + ] + ``` + + ### Configuration Options Make sure to specify a template name, such as `granite` or `llama3`, and to set the `contextLength` to the model's context window size. You can also configure generation parameters, such as temperature, topP, topK, frequency penalty, and stop sequences: -```json title="~/.continue/config.json" -{ - "models": [ - { - "model": "ibm/granite-20b-code-instruct", - "title": "Granite Code 20b", - "provider": "watsonx", - "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com", - "projectId": "PROJECT_ID", - "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", - "apiVersion": "2024-03-14", - "template": "granite", - "contextLength": 8000, - "completionOptions": { - "temperature": 0.1, - "topP": 0.3, - "topK": 20, - "maxTokens": 2000, - "frequencyPenalty": 1.1, - "stop": ["Question:", "\n\n\n"] + + + ```yaml title="config.yaml" + models: + - name: Granite Code 20b + provider: watsonx + model: ibm/granite-20b-code-instruct + apiBase: watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com + projectId: PROJECT_ID + apiKey: API_KEY/ZENAPI_KEY/USERNAME:PASSWORD + apiVersion: 2024-03-14 + template: granite + contextLength: 8000 + defaultCompletionOptions: + temperature: 0.1 + topP: 0.3 + topK: 20 + maxTokens: 2000 + frequencyPenalty: 1.1 + stop: + - Question: + - "\n\n\n" + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "model": "ibm/granite-20b-code-instruct", + "title": "Granite Code 20b", + "provider": "watsonx", + "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com", + "projectId": "PROJECT_ID", + "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", + "apiVersion": "2024-03-14", + "template": "granite", + "contextLength": 8000, + "completionOptions": { + "temperature": 0.1, + "topP": 0.3, + "topK": 20, + "maxTokens": 2000, + "frequencyPenalty": 1.1, + "stop": ["Question:", "\n\n\n"] + } } - } - ] -} -``` + ] + ``` + + ## Tab Auto Complete Model Granite models are recommended for tab auto complete. The configuration is similar to that of the chat models: -```json title="~/.continue/config.json" -{ - "tabAutocompleteModel": { - "model": "ibm/granite-8b-code-instruct", - "title": "Granite Code 8b", - "provider": "watsonx", - "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com", - "projectId": "PROJECT_ID", - "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", - "apiVersion": "2024-03-14", - "contextLength": 4000 - } -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Granite Code 8b + provider: watsonx + model: ibm/granite-8b-code-instruct + apiBase: watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com + projectId: PROJECT_ID + apiKey: API_KEY/ZENAPI_KEY/USERNAME:PASSWORD + apiVersion: 2024-03-14 + roles: + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" + "tabAutocompleteModel": { + "model": "ibm/granite-8b-code-instruct", + "title": "Granite Code 8b", + "provider": "watsonx", + "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com", + "projectId": "PROJECT_ID", + "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", + "apiVersion": "2024-03-14", + "contextLength": 4000 + } + ``` + + ## Embeddings Model To view the list of available embeddings models, visit [this page](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/fm-models-embed.html?context=wx&pos=2#ibm-provided). -```json title="~/.continue/config.json -{ + + + ```yaml title="config.yaml" + models: + - name: Watsonx Embedder + provider: watsonx + model: ibm/slate-30m-english-rtrvr-v2 + apiBase: https://us-south.ml.cloud.ibm.com + projectId: PROJECT_ID + apiKey: API_KEY/ZENAPI_KEY/USERNAME:PASSWORD + apiVersion: 2024-03-14 + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" "embeddingsProvider": { "provider": "watsonx", "model": "ibm/slate-30m-english-rtrvr-v2", @@ -143,5 +227,6 @@ To view the list of available embeddings models, visit [this page](https://datap "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", "apiVersion": "2024-03-14" } -} -``` + ``` + + diff --git a/docs/docs/customize/model-providers/top-level/anthropic.mdx b/docs/docs/customize/model-providers/top-level/anthropic.mdx index 8ef4ebb64..6cfc9d06c 100644 --- a/docs/docs/customize/model-providers/top-level/anthropic.mdx +++ b/docs/docs/customize/model-providers/top-level/anthropic.mdx @@ -14,18 +14,29 @@ You can get an API key from the [Anthropic console](https://console.anthropic.co We recommend configuring **Claude 3.5 Sonnet** as your chat model. -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Claude 3.5 Sonnet", - "provider": "anthropic", - "model": "claude-3-5-sonnet-latest", - "apiKey": "[API_KEY]" - } - ] -} -``` + + + ```yaml title="config.yaml" + models: + - name: Claude 3.5 Sonnet + provider: anthropic + model: claude-3-5-sonnet-latest + apiKey: ${{ secrets.ANTHROPIC_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Claude 3.5 Sonnet", + "provider": "anthropic", + "model": "claude-3-5-sonnet-latest", + "apiKey": "[API_KEY]" + } + ] + ``` + + ## Autocomplete model @@ -37,13 +48,13 @@ Anthropic currently does not offer any autocomplete models. Anthropic currently does not offer any embeddings models. -[Click here](../../model-types/embeddings.md) to see a list of embeddings model providers. +[Click here](../../model-types/embeddings.mdx) to see a list of embeddings model providers. ## Reranking model Anthropic currently does not offer any reranking models. -[Click here](../../model-types/reranking.md) to see a list of reranking model providers. +[Click here](../../model-types/reranking.mdx) to see a list of reranking model providers. ## Prompt caching @@ -51,11 +62,25 @@ Anthropic supports [prompt caching with Claude](https://docs.anthropic.com/en/do To enable caching of the system message and the turn-by-turn conversation, update your your model configuration as following: -```json title="config.json (Deprecated)" -{ + + + ```yaml title="Package or config.yaml" + models: + - name: Anthropic + provider: anthropic + model: claude-3-5-sonnet-latest + apiKey: ${{ secrets.ANTHROPIC_API_KEY }} + roles: + - chat + cacheBehavior: + cacheSystemMessage: true + cacheConversation: true + ``` + + + ```json title="config.json (Deprecated)" "models": [ { - // Enable prompt caching "cacheBehavior": { "cacheSystemMessage": true, "cacheConversation": true @@ -66,5 +91,6 @@ To enable caching of the system message and the turn-by-turn conversation, updat "apiKey": "[API_KEY]" } ] -} -``` + ``` + + diff --git a/docs/docs/customize/model-providers/top-level/azure.mdx b/docs/docs/customize/model-providers/top-level/azure.mdx index 111460b73..79e4c7522 100644 --- a/docs/docs/customize/model-providers/top-level/azure.mdx +++ b/docs/docs/customize/model-providers/top-level/azure.mdx @@ -9,60 +9,101 @@ import TabItem from "@theme/TabItem"; Azure AI Foundry is a cloud-based service that provides access to models from OpenAI, Mistral AI, and others, integrated with the security and enterprise features of the Microsoft Azure platform. To get started, create an Azure AI Foundry resource in the [Azure portal](https://portal.azure.com). :::info - For details on OpenAI model setup, see [Azure OpenAI Service configuration](#general-model-configuration). - ::: ## Chat model We recommend configuring **GPT-4o** as your chat model. -```json title="config.json (Deprecated)" -"models": [{ - "title": "GPT-4o", - "provider": "azure", - "model": "gpt-4o", - "apiBase": "", - "deployment": "", - "apiKey": "" // If you use subscription key, try using Azure gateway to rename it apiKey -}] -``` + + + ```yaml title="config.yaml" + models: + - name: GPT-4o + provider: azure + model: gpt-4o + apiBase: + deployment: + apiKey: ${{ secrets.AZURE_API_KEY }} # If you use subscription key, try using Azure gateway to rename it apiKey + ``` + + + ```json title="config.json (Deprecated)" + "models": [{ + "title": "GPT-4o", + "provider": "azure", + "model": "gpt-4o", + "apiBase": "", + "deployment": "", + "apiKey": "" // If you use subscription key, try using Azure gateway to rename it apiKey + }] + ``` + + ## Autocomplete model We recommend configuring **Codestral** as your autocomplete model. -```json title="config.json (Deprecated)" -{ - "tabAutocompleteModel": { - "title": "Codestral", - "provider": "mistral", - "model": "codestral-latest" - } -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Codestral + provider: mistral + model: codestral-latest + roles: + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" + "tabAutocompleteModel": { + "title": "Codestral", + "provider": "mistral", + "model": "codestral-latest" + } + ``` + + ## Embeddings model We recommend configuring **text-embedding-3-large** as your embeddings model. -```json title="config.json (Deprecated)" -"embeddingsProvider": { - "provider": "openai", - "model": "text-embedding-3-large", - "apiBase": "", - "deployment": "", - "apiType": "azure", - "apiKey": "" -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Text Embedding-3 Large + provider: openai + model: text-embedding-3-large + apiBase: + deployment: + apiType: azure + apiKey: ${{ secrets.AZURE_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "provider": "openai", + "model": "text-embedding-3-large", + "apiBase": "", + "deployment": "", + "apiType": "azure", + "apiKey": "" + } + ``` + + ## Reranking model Azure OpenAI currently does not offer any reranking models. -[Click here](../../model-types/reranking.md) to see a list of reranking models. +[Click here](../../model-types/reranking.mdx) to see a list of reranking models. ## Privacy @@ -82,14 +123,30 @@ To find this information in _Azure AI Foundry_, first select the model that you For example, a Target URI of `https://just-an-example.openai.azure.com/openai/deployments/gpt-4o-july/chat/completions?api-version=2023-03-15-preview` would map to the following: -```json title="config.json (Deprecated)" -{ - "title": "GPT-4o Azure", - "model": "gpt-4o", - "provider": "openai", - "apiBase": "https://just-an-example.openai.azure.com", - "deployment": "gpt-4o-july", - "apiVersion": "2023-03-15-preview", - "apiKey": "" -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: GPT-4o Azure + model: gpt-4o + provider: openai + apiBase: https://just-an-example.openai.azure.com + deployment: gpt-4o-july + apiVersion: 2023-03-15-preview + apiKey: ${{ secrets.AZURE_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + { + "title": "GPT-4o Azure", + "model": "gpt-4o", + "provider": "openai", + "apiBase": "https://just-an-example.openai.azure.com", + "deployment": "gpt-4o-july", + "apiVersion": "2023-03-15-preview", + "apiKey": "" + } + ``` + + diff --git a/docs/docs/customize/model-providers/top-level/bedrock.mdx b/docs/docs/customize/model-providers/top-level/bedrock.mdx index cf6edf0e4..be716081e 100644 --- a/docs/docs/customize/model-providers/top-level/bedrock.mdx +++ b/docs/docs/customize/model-providers/top-level/bedrock.mdx @@ -161,8 +161,6 @@ To setup Bedrock using custom imported models, add the following to your config modelArn: arn:aws:bedrock:us-west-2:XXXXX:imported-model/XXXXXX region: us-west-2 profile: bedrock - roles: - - chat ``` diff --git a/docs/docs/customize/model-providers/top-level/deepseek.mdx b/docs/docs/customize/model-providers/top-level/deepseek.mdx index f6c1701f1..703959473 100644 --- a/docs/docs/customize/model-providers/top-level/deepseek.mdx +++ b/docs/docs/customize/model-providers/top-level/deepseek.mdx @@ -21,7 +21,7 @@ We recommend configuring **DeepSeek Chat** as your chat model. - name: DeepSeek Chat provider: deepseek model: deepseek-chat - apiKey: [API_KEY] + apiKey: ${{ secrets.DEEPSEEK_API_KEY }} ``` @@ -68,10 +68,10 @@ We recommend configuring **DeepSeek Coder** as your autocomplete model. DeepSeek currently does not offer any embeddings models. -[Click here](../../model-types/embeddings.md) to see a list of embeddings model providers. +[Click here](../../model-types/embeddings.mdx) to see a list of embeddings model providers. ## Reranking model DeepSeek currently does not offer any reranking models. -[Click here](../../model-types/reranking.md) to see a list of reranking model providers. +[Click here](../../model-types/reranking.mdx) to see a list of reranking model providers. diff --git a/docs/docs/customize/model-providers/top-level/gemini.mdx b/docs/docs/customize/model-providers/top-level/gemini.mdx index 490c00996..eaf4e981d 100644 --- a/docs/docs/customize/model-providers/top-level/gemini.mdx +++ b/docs/docs/customize/model-providers/top-level/gemini.mdx @@ -21,9 +21,7 @@ We recommend configuring **Gemini 1.5 Pro** as your chat model. - name: Gemini 1.5 Pro provider: gemini model: gemini-1.5-pro-latest - apiKey: "[API_KEY]" - roles: - - chat + apiKey: ${{ secrets.GEMINI_API_KEY }} ``` @@ -57,7 +55,7 @@ We recommend configuring **text-embedding-004** as your embeddings model. - name: Gemini Embeddings provider: gemini model: models/text-embedding-004 - apiKey: "[API_KEY]" + apiKey: ${{ secrets.GEMINI_API_KEY }} roles: - embed ``` @@ -77,4 +75,4 @@ We recommend configuring **text-embedding-004** as your embeddings model. Gemini currently does not offer any reranking models. -[Click here](../../model-types/reranking.md) to see a list of reranking model providers. +[Click here](../../model-types/reranking.mdx) to see a list of reranking model providers. diff --git a/docs/docs/customize/model-providers/top-level/mistral.mdx b/docs/docs/customize/model-providers/top-level/mistral.mdx index 158b8169f..4a86454eb 100644 --- a/docs/docs/customize/model-providers/top-level/mistral.mdx +++ b/docs/docs/customize/model-providers/top-level/mistral.mdx @@ -21,7 +21,7 @@ We recommend configuring **Mistral Large** as your chat model. - name: Mistral Large provider: mistral model: mistral-large-latest - apiKeySecret: MISTRAL_API_KEY + apiKey: MISTRAL_API_KEY roles: - chat ``` @@ -79,7 +79,7 @@ We recommend configuring **Mistral Embed** as your embeddings model. - name: Mistral Embed provider: mistral model: mistral-embed - apiKeySecret: MISTRAL_API_KEY + apiKey: MISTRAL_API_KEY apiBase: https://api.mistral.ai/v1 roles: - embed @@ -101,4 +101,4 @@ We recommend configuring **Mistral Embed** as your embeddings model. Mistral currently does not offer any reranking models. -[Click here](../../model-types/reranking.md) to see a list of reranking model providers. +[Click here](../../model-types/reranking.mdx) to see a list of reranking model providers. diff --git a/docs/docs/customize/model-providers/top-level/ollama.mdx b/docs/docs/customize/model-providers/top-level/ollama.mdx index 6052372f0..b3da6a978 100644 --- a/docs/docs/customize/model-providers/top-level/ollama.mdx +++ b/docs/docs/customize/model-providers/top-level/ollama.mdx @@ -89,7 +89,7 @@ We recommend configuring **Nomic Embed Text** as your embeddings model. Ollama currently does not offer any reranking models. -[Click here](../../model-types/reranking.md) to see a list of reranking model providers. +[Click here](../../model-types/reranking.mdx) to see a list of reranking model providers. ## Using a remote instance @@ -99,7 +99,7 @@ To configure a remote instance of Ollama, add the `"apiBase"` property to your m ```yaml title="Package or config.yaml" models: - - title: Llama3.1 8B + - name: Llama3.1 8B provider: ollama model: llama3.1:8b apiBase: http://:11434 diff --git a/docs/docs/customize/model-providers/top-level/openai.mdx b/docs/docs/customize/model-providers/top-level/openai.mdx index c4338e036..e057cbd1f 100644 --- a/docs/docs/customize/model-providers/top-level/openai.mdx +++ b/docs/docs/customize/model-providers/top-level/openai.mdx @@ -21,7 +21,7 @@ We recommend configuring **GPT-4o** as your chat model. - name: GPT-4o provider: openai model: gpt-4o - apiKeySecret: OPENAI_KEY + apiKey: ${{ secrets.HUGGINGFACE_TEI_API_KEY }} ``` @@ -57,7 +57,7 @@ We recommend configuring **text-embedding-3-large** as your embeddings model. - name: OpenAI Embeddings provider: openai model: text-embedding-3-large - apiKey: + apiKey: ${{ secrets.HUGGINGFACE_TEI_API_KEY }} roles: - embed ``` @@ -79,7 +79,7 @@ We recommend configuring **text-embedding-3-large** as your embeddings model. OpenAI currently does not offer any reranking models. -[Click here](../../model-types/reranking.md) to see a list of reranking model providers. +[Click here](../../model-types/reranking.mdx) to see a list of reranking model providers. ## OpenAI compatible servers / APIs @@ -109,9 +109,7 @@ If you are using an OpenAI compatible server / API, you can change the `apiBase` provider: openai model: MODEL_NAME apiBase: http://localhost:8000/v1 - apiKeySecret: EMPTY - roles: - - chat + apiKey: ${{ secrets.CUSTOM_API_KEY }} ``` @@ -121,7 +119,7 @@ If you are using an OpenAI compatible server / API, you can change the `apiBase` "title": "OpenAI-compatible server / API", "provider": "openai", "model": "MODEL_NAME", - "apiKey": "EMPTY", + "apiKey": "CUSTOM_API_KEY", "apiBase": "http://localhost:8000/v1" } ] diff --git a/docs/docs/customize/model-providers/top-level/vertexai.mdx b/docs/docs/customize/model-providers/top-level/vertexai.mdx index 6146e1ce3..07be57891 100644 --- a/docs/docs/customize/model-providers/top-level/vertexai.mdx +++ b/docs/docs/customize/model-providers/top-level/vertexai.mdx @@ -21,7 +21,7 @@ We recommend configuring **Claude 3.5 Sonnet** as your chat model. - name: Claude 3.5 Sonnet provider: vertexai model: claude-3-5-sonnet-20240620 - projectId: [PROJECT_ID] + projectId: region: us-east5 ``` @@ -51,7 +51,7 @@ We recommend configuring **Codestral** or **code-gecko** as your autocomplete mo - name: Codestral (Vertex AI) provider: vertexai model: codestral - projectId: [PROJECT_ID] + projectId: region: us-central1 roles: - autocomplete @@ -81,7 +81,7 @@ We recommend configuring **text-embedding-004** as your embeddings model. - name: Text Embedding-004 provider: vertexai model: text-embedding-004 - projectId: [PROJECT_ID] + projectId: region: us-central1 roles: - embed @@ -103,4 +103,4 @@ We recommend configuring **text-embedding-004** as your embeddings model. Vertex AI currently does not offer any reranking models. -[Click here](../../model-types/reranking.md) to see a list of reranking model providers. +[Click here](../../model-types/reranking.mdx) to see a list of reranking model providers. diff --git a/docs/docs/customize/model-providers/top-level/xAI.mdx b/docs/docs/customize/model-providers/top-level/xAI.mdx index 130ffa775..fea7b261d 100644 --- a/docs/docs/customize/model-providers/top-level/xAI.mdx +++ b/docs/docs/customize/model-providers/top-level/xAI.mdx @@ -21,7 +21,7 @@ We recommend configuring **grok-beta** as your chat model. - name: Grok Beta provider: xAI model: grok-beta - apiKey: + apiKey: ${{ secrets.GROK_API_KEY }} ``` @@ -31,7 +31,7 @@ We recommend configuring **grok-beta** as your chat model. "title": "Grok Beta", "provider": "xAI", "model": "grok-beta", - "apiKey": "[API_KEY]" + "apiKey": "" } ] ``` @@ -48,10 +48,10 @@ xAI currently does not offer any autocomplete models. xAI currently does not offer any embeddings models. -[Click here](../../model-types/embeddings.md) to see a list of embeddings model providers. +[Click here](../../model-types/embeddings.mdx) to see a list of embeddings model providers. ## Reranking model xAI currently does not offer any reranking models. -[Click here](../../model-types/reranking.md) to see a list of reranking model providers. +[Click here](../../model-types/reranking.mdx) to see a list of reranking model providers. diff --git a/docs/docs/customize/model-types/autocomplete.md b/docs/docs/customize/model-types/autocomplete.md index d85920605..4b14775d1 100644 --- a/docs/docs/customize/model-types/autocomplete.md +++ b/docs/docs/customize/model-types/autocomplete.md @@ -11,6 +11,6 @@ In Continue, these models are used to display inline [Autocomplete](../../autoco ## Recommended Autocomplete models -If you have the ability to use any model, we recommend `Codestral` with [Mistral](../model-providers/top-level/mistral.md#autocomplete-model) or [Vertex AI](../model-providers/top-level/vertexai.md#autocomplete-model). +If you have the ability to use any model, we recommend `Codestral` with [Mistral](../model-providers/top-level/mistral.mdx#autocomplete-model) or [Vertex AI](../model-providers/top-level/vertexai.mdx#autocomplete-model). -If you want to run a model locally, we recommend `Qwen2.5-Coder 1.5B` with [Ollama](../model-providers/top-level/ollama.md#autocomplete-model). +If you want to run a model locally, we recommend `Qwen2.5-Coder 1.5B` with [Ollama](../model-providers/top-level/ollama.mdx#autocomplete-model). diff --git a/docs/docs/customize/model-types/chat.md b/docs/docs/customize/model-types/chat.md index fb6a91f15..447021251 100644 --- a/docs/docs/customize/model-types/chat.md +++ b/docs/docs/customize/model-types/chat.md @@ -9,10 +9,10 @@ A "chat model" is an LLM that is trained to respond in a conversational format. ## Recommended Chat models -If you have the ability to use any model, we recommend [Claude 3.5 Sonnet](../model-providers/top-level/anthropic.md). +If you have the ability to use any model, we recommend [Claude 3.5 Sonnet](../model-providers/top-level/anthropic.mdx). Otherwise, some of the next best options are: -- [GPT-4o](../model-providers/top-level/openai.md) -- [Gemini 1.5 Pro](../model-providers/top-level/gemini.md) +- [GPT-4o](../model-providers/top-level/openai.mdx) +- [Gemini 1.5 Pro](../model-providers/top-level/gemini.mdx) - [Llama3.1 405B](../tutorials/llama3.1.md) diff --git a/docs/docs/customize/model-types/embeddings.mdx b/docs/docs/customize/model-types/embeddings.mdx index 66fcf9a20..3f3d76dda 100644 --- a/docs/docs/customize/model-types/embeddings.mdx +++ b/docs/docs/customize/model-types/embeddings.mdx @@ -7,7 +7,7 @@ sidebar_position: 3 An "embeddings model" is trained to convert a piece of text into a vector, which can later be rapidly compared to other vectors to determine similarity between the pieces of text. Embeddings models are typically much smaller than LLMs, and will be extremely fast and cheap in comparison. -In Continue, embeddings are generated during indexing and then used by [@Codebase](../deep-dives/codebase.md) to perform similarity search over your codebase. +In Continue, embeddings are generated during indexing and then used by [@Codebase](../deep-dives/codebase.mdx) to perform similarity search over your codebase. :::info[Default model (VS Code only)] `transformers.js` is used as a default embeddings model in VS Code. In JetBrains, there currently is no default. @@ -21,83 +21,118 @@ The free trial supports embeddings (provider: `free-trial`) If you have the ability to use any model, we recommend `voyage-code-3`, which is listed below along with the rest of the options for embeddings models. -If you want to generate embeddings locally, we recommend using `nomic-embed-text` with [Ollama](../model-providers/top-level/ollama.md#embeddings-model). +If you want to generate embeddings locally, we recommend using `nomic-embed-text` with [Ollama](../model-providers/top-level/ollama.mdx#embeddings-model). ### Voyage AI After obtaining an API key from [here](https://www.voyageai.com/), you can configure like this: -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "provider": "voyage", - "model": "voyage-code-3", - "apiKey": "" - } -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Voyage Code 3 + provider: voyage + model: voyage-code-3 + apiKey: ${{ secrets.VOYAGE_API_KEY }} + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "provider": "voyage", + "model": "voyage-code-3", + "apiKey": "" + } + ``` + + ### Ollama -See [here](../model-providers/top-level/ollama.md#embeddings-model) for instructions on how to use Ollama for embeddings. +See [here](../model-providers/top-level/ollama.mdx#embeddings-model) for instructions on how to use Ollama for embeddings. ### Transformers.js (currently VS Code only) [Transformers.js](https://huggingface.co/docs/transformers.js/index) is a JavaScript port of the popular [Transformers](https://huggingface.co/transformers/) library. It allows embeddings to be calculated entirely locally. The model used is `all-MiniLM-L6-v2`, which is shipped alongside the Continue extension. -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "provider": "transformers.js" - } -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: default-transformers + provider: transformers.js + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "provider": "transformers.js" + } + ``` + + ### Text Embeddings Inference [Hugging Face Text Embeddings Inference](https://huggingface.co/docs/text-embeddings-inference/en/index) enables you to host your own embeddings endpoint. You can configure embeddings to use your endpoint as follows: -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "provider": "huggingface-tei", - "apiBase": "http://localhost:8080" - } -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Huggingface TEI Embedder + provider: huggingface-tei + apiBase: http://localhost:8080 + roles: [embed] + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "provider": "huggingface-tei", + "apiBase": "http://localhost:8080" + } + ``` + + ### OpenAI -See [here](../model-providers/top-level/openai.md#embeddings-model) for instructions on how to use OpenAI for embeddings. +See [here](../model-providers/top-level/openai.mdx#embeddings-model) for instructions on how to use OpenAI for embeddings. ### Cohere -See [here](../model-providers/more/cohere.md#embeddings-model) for instructions on how to use Cohere for embeddings. +See [here](../model-providers/more/cohere.mdx#embeddings-model) for instructions on how to use Cohere for embeddings. ### Gemini -See [here](../model-providers/top-level/gemini.md#embeddings-model) for instructions on how to use Gemini for embeddings. +See [here](../model-providers/top-level/gemini.mdx#embeddings-model) for instructions on how to use Gemini for embeddings. ### Vertex -See [here](../model-providers/top-level/vertexai.md#embeddings-model) for instructions on how to use Vertex for embeddings. +See [here](../model-providers/top-level/vertexai.mdx#embeddings-model) for instructions on how to use Vertex for embeddings. ### Mistral -See [here](../model-providers/top-level/mistral.md#embeddings-model) for instructions on how to use Mistral for embeddings. +See [here](../model-providers/top-level/mistral.mdx#embeddings-model) for instructions on how to use Mistral for embeddings. ### NVIDIA -See [here](../model-providers/more/nvidia.md#embeddings-model) for instructions on how to use NVIDIA for embeddings. +See [here](../model-providers/more/nvidia.mdx#embeddings-model) for instructions on how to use NVIDIA for embeddings. ### Bedrock -See [here](../model-providers/top-level/bedrock.md#embeddings-model) for instructions on how to use Bedrock for embeddings. +See [here](../model-providers/top-level/bedrock.mdx#embeddings-model) for instructions on how to use Bedrock for embeddings. ### WatsonX -See [here](../model-providers/more/watsonx.md#embeddings-model) for instructions on how to use WatsonX for embeddings. +See [here](../model-providers/more/watsonx.mdx#embeddings-model) for instructions on how to use WatsonX for embeddings. ### LMStudio -See [here](../model-providers/more/lmstudio.md#embeddings-model) for instructions on how to use LMStudio for embeddings. +See [here](../model-providers/more/lmstudio.mdx#embeddings-model) for instructions on how to use LMStudio for embeddings. diff --git a/docs/docs/customize/model-types/reranking.mdx b/docs/docs/customize/model-types/reranking.mdx index ef2622105..b824a2220 100644 --- a/docs/docs/customize/model-types/reranking.mdx +++ b/docs/docs/customize/model-types/reranking.mdx @@ -10,7 +10,7 @@ import TabItem from "@theme/TabItem"; A "reranking model" is trained to take two pieces of text (often a user question and a document) and return a relevancy score between 0 and 1, estimating how useful the document will be in answering the question. Rerankers are typically much smaller than LLMs, and will be extremely fast and cheap in comparison. -In Continue, reranking is used by [@Codebase](../deep-dives/codebase.md) in order to select the most relevant code snippets after vector search. +In Continue, reranking is used by [@Codebase](../deep-dives/codebase.mdx) in order to select the most relevant code snippets after vector search. ## Recommended reranking models @@ -26,7 +26,7 @@ Voyage AI offers the best reranking model for code with their `rerank-2` model. models: - name: My Voyage Reranker provider: voyage - apiKey: + apiKey: ${{ secrets.VOYAGE_API_KEY }} model: rerank-2 roles: - rerank @@ -56,7 +56,7 @@ See Cohere's documentation for rerankers [here](https://docs.cohere.com/docs/rer - name: Cohere Reranker provider: cohere model: rerank-english-v3.0 - apiKey: + apiKey: ${{ secrets.COHERE_API_KEY }} roles: - rerank ``` @@ -114,7 +114,7 @@ The `"modelTitle"` field must match one of the models in your "models" array in - name: Huggingface-tei Reranker provider: huggingface-tei apiBase: http://localhost:8080 - apiKey: + apiKey: ${{ secrets.HUGGINGFACE_TEI_API_KEY }} roles: - rerank ``` diff --git a/docs/docs/customize/overview.md b/docs/docs/customize/overview.md index 83e479132..fdbd1a61e 100644 --- a/docs/docs/customize/overview.md +++ b/docs/docs/customize/overview.md @@ -6,36 +6,36 @@ keywords: [customize, configure, config] Continue can be deeply customized. For example you might: -- **Change your Model Provider**. Continue allows you to choose your favorite or even add multiple model providers. This allows you to use different models for different tasks, or to try another model if you're not happy with the results from your current model. Continue supports all of the popular model providers, including OpenAI, Anthropic, Microsoft/Azure, Mistral, and more. You can even self host your own model provider if you'd like. Learn more about [model providers](/customize/model-providers). -- **Select different model providers for each Compose feature**. Different Continue features can use different model providers. We call these _model types_. For example, you can use a different model provider for chat than you do for autocomplete. Learn more about [model types](/customize/model-types) . -- **Add a Context Provider**. Context providers allow you to add information to your prompts, giving your LLM additional context to work with. Context providers allow you to reference snippets from your codebase, or lookup relevant documentation, or use a search engine to find information and much more. Learn more about [context providers](/customize/context-providers). -- **Create a Slash Command**. Slash commands allow you to easily add custom functionality to Continue. You can use a slash command that allows you to generate a shell command from natural language, or perhaps generate a commit message, or create your own custom command to do whatever you want. Learn more about [slash commands](/customize/slash-commands). -- **Call external tools and functions**. Unchain your LLM with the power of _Tools_. You can call any external tool or function from your prompts. Currently only available with Anthropic. Learn more about [Tools](/customize/tools). +- **Change your Model Provider**. Continue allows you to choose your favorite or even add multiple model providers. This allows you to use different models for different tasks, or to try another model if you're not happy with the results from your current model. Continue supports all of the popular model providers, including OpenAI, Anthropic, Microsoft/Azure, Mistral, and more. You can even self host your own model provider if you'd like. Learn more about [model providers](../customize/model-providers/). +- **Select different model providers for each Compose feature**. Different Continue features can use different model providers. We call these _model types_. For example, you can use a different model provider for chat than you do for autocomplete. Learn more about [model types](../customize/model-types/) . +- **Add a Context Provider**. Context providers allow you to add information to your prompts, giving your LLM additional context to work with. Context providers allow you to reference snippets from your codebase, or lookup relevant documentation, or use a search engine to find information and much more. Learn more about [context providers](/customize/context-providers). +- **Create a Slash Command**. Slash commands allow you to easily add custom functionality to Continue. You can use a slash command that allows you to generate a shell command from natural language, or perhaps generate a commit message, or create your own custom command to do whatever you want. Learn more about [slash commands](/customize/slash-commands). +- **Call external tools and functions**. Unchain your LLM with the power of _Tools_. You can call any external tool or function from your prompts. Currently only available with Anthropic. Learn more about [Tools](/customize/tools). -Whatever you choose, you'll probably start by editing `config.json`. +Whatever you choose, you'll probably start by editing `config.yaml`. ## Editing config.json -Most custom configuration is done by editing `config.json`. This file is a JSON file that allows you to customize Continue to your liking. It is found at: +Most custom configuration is done by editing `config.yaml` (or Deprecated `config.json`). This is a YAML file that allows you to customize Continue to your liking. It is found at: -- MacOS and Linux: `~/.continue/config.json` -- Windows: `%USERPROFILE%\.continue\config.json` +- MacOS and Linux: `~/.continue/config.yaml` +- Windows: `%USERPROFILE%\.continue\config.yaml` -You can easily access `config.json` from the Continue Chat sidebar. Open the sidebar by pressing cmd/ctrl + L (VS Code) or cmd/ctrl + J (JetBrains) and click the "gear" icon in the bottom right corner. +You can easily access config file from the Continue Chat sidebar. Open the sidebar by pressing cmd/ctrl + L (VS Code) or cmd/ctrl + J (JetBrains) and click the "gear" icon in the bottom right corner. ![configure-continue](/img/configure-continue.png) -When editing this file, you can see the available options suggested as you type, or you can check the [full reference](./deep-dives/configuration.md). +When editing this file, you can see the available options suggested as you type, or you can check the [full reference](./deep-dives/configuration.mdx). :::info -`config.json` is created the first time you use Continue. If you'd like to reset your configuration to the default, you can delete this file and Continue will automatically recreate it with the default settings. +A configuration file is created the first time you use Continue. If you'd like to reset your configuration to the default, you can delete this file and Continue will automatically recreate it with the default settings. ::: :::info -When you save `config.json`, Continue will automatically refresh to take into account your changes. +When you save a configuration file from the IDE, Continue will automatically refresh to take into account your changes. ::: @@ -45,6 +45,6 @@ If you'd like to scope certain settings to a particular workspace, you can add a ## Programmatic configuration -`config.json` can handle the vast majority of necessary configuration, so we recommend using it whenever possible. However, if you need to programmatically configure Continue, you can use `config.ts`, which is located at `~/.continue/config.ts` (MacOS / Linux) or `%USERPROFILE%\.continue\config.ts` (Windows). +`config.yaml` or `config.json` can handle the vast majority of necessary configuration, so we recommend using it whenever possible. However, if you need to programmatically configure Continue, you can use `config.ts`, which is located at `~/.continue/config.ts` (MacOS / Linux) or `%USERPROFILE%\.continue\config.ts` (Windows). For examples of how to use `config.ts`, see [writing custom slash commands](./tutorials/build-your-own-slash-command.md#custom-slash-commands) or [writing custom context providers](./tutorials/build-your-own-context-provider.md). diff --git a/docs/docs/customize/slash-commands.mdx b/docs/docs/customize/slash-commands.mdx index 79cede310..661501097 100644 --- a/docs/docs/customize/slash-commands.mdx +++ b/docs/docs/customize/slash-commands.mdx @@ -8,7 +8,7 @@ import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; :::info -Slash commands can currently only be added using [`config.json`](../json-reference.md), which has been deprecated in favor of the [`YAML Config Format`](../reference.md). We recommend looking into [Prompt Files](../customize/deep-dives//prompt-files.md) to achieve similar functionality. +Slash commands can currently only be added using [`config.json`](../json-reference.md), which has been deprecated in favor of the [`YAML Config Format`](../reference.md). We recommend looking into [Prompt Files](../customize/deep-dives/prompt-files.md) to achieve similar functionality. ::: Slash commands are shortcuts that can be activated by typing '/' and selecting from the dropdown. For example, the built-in '/edit' slash command lets you stream edits directly into your editor. diff --git a/docs/docs/customize/tools.mdx b/docs/docs/customize/tools.mdx index 8f94462b1..6fac7f651 100644 --- a/docs/docs/customize/tools.mdx +++ b/docs/docs/customize/tools.mdx @@ -24,7 +24,7 @@ To let you balance speed and safety, each tool can be set to 1 of 3 modes: ### Custom tools -Currently custom tools can be configured using the [Model Context Protocol](https://modelcontextprotocol.io/introduction), a standard proposed by Anthropic to unify prompts, context, and tool use. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then configure your `config.json` like this: +Currently custom tools can be configured using the [Model Context Protocol](https://modelcontextprotocol.io/introduction), a standard proposed by Anthropic to unify prompts, context, and tool use. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then configure your [config](../customize/deep-dives/configuration.md) like this: diff --git a/docs/docs/customize/tutorials/build-your-own-context-provider.md b/docs/docs/customize/tutorials/build-your-own-context-provider.md index 48ec810e9..53c40f910 100644 --- a/docs/docs/customize/tutorials/build-your-own-context-provider.md +++ b/docs/docs/customize/tutorials/build-your-own-context-provider.md @@ -2,6 +2,10 @@ title: Build your own context provider --- +:::info +Custom context providers are added through `~/config.ts`, which has been deprecated in favor of the [`YAML Config Format`](../reference.md). We recommend looking into [Prompt Files](../deep-dives/prompt-files.md) and [MCP Servers](../context-providers.mdx#modelcontextprotocol) to achieve similar functionality. +::: + ## Introductory Example To write your own context provider, you just have to implement the `CustomContextProvider` @@ -69,7 +73,7 @@ export function modifyConfig(config: Config): Config { } ``` -No modification in `config.json` is necessary. +This is automatically appended to your configuration. ## Custom Context Providers with Submenu or Query diff --git a/docs/docs/customize/tutorials/custom-code-rag.md b/docs/docs/customize/tutorials/custom-code-rag.mdx similarity index 86% rename from docs/docs/customize/tutorials/custom-code-rag.md rename to docs/docs/customize/tutorials/custom-code-rag.mdx index 653ada9c4..82f41b396 100644 --- a/docs/docs/customize/tutorials/custom-code-rag.md +++ b/docs/docs/customize/tutorials/custom-code-rag.mdx @@ -1,6 +1,9 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # Custom code RAG -While Continue comes with [@Codebase](../deep-dives/codebase.md) out of the box, you might wish to set up your own vector database and build a custom retrieval-augmented generation (RAG) system. This can allow you to access code that is not available locally, to index code a single time across all users, or to include custom logic. In this guide, we'll walk you through the steps it takes to build this. +While Continue comes with [@Codebase](../deep-dives/codebase.mdx) out of the box, you might wish to set up your own vector database and build a custom retrieval-augmented generation (RAG) system. This can allow you to access code that is not available locally, to index code a single time across all users, or to include custom logic. In this guide, we'll walk you through the steps it takes to build this. ## Step 1: Choose an embeddings model @@ -122,19 +125,36 @@ async def create_item(item: ContextProviderInput): return context_items ``` -After you've set up your server, you can configure Continue to use it by adding the "http" context provider to your `contextProviders` array in `config.json`: +After you've set up your server, you can configure Continue to use it by adding the "http" context provider to your `contextProviders` array in your configuration: -```json title="config.json (Deprecated)" -{ - "name": "http", - "params": { - "url": "https://myserver.com/retrieve", - "title": "http", - "description": "Custom HTTP Context Provider", - "displayTitle": "My Custom Context" - } -} -``` + + + ```yaml title="config.yaml" + context: + - uses: http + with: + url: https://myserver.com/retrieve + name: http + description: Custom HTTP Context Provider + displayTitle: My Custom Context + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "http", + "params": { + "url": "https://myserver.com/retrieve", + "title": "http", + "description": "Custom HTTP Context Provider", + "displayTitle": "My Custom Context" + } + } + ] + ``` + + ## Step 7 (Bonus): Set up reranking diff --git a/docs/docs/customize/tutorials/how-to-self-host-a-model.md b/docs/docs/customize/tutorials/how-to-self-host-a-model.md deleted file mode 100644 index bd4093402..000000000 --- a/docs/docs/customize/tutorials/how-to-self-host-a-model.md +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: How to self-host a model ---- - -You can deploy a model in your [AWS](https://github.com/continuedev/deploy-os-code-llm#aws), [GCP](https://github.com/continuedev/deploy-os-code-llm#gcp), [Azure](https://github.com/continuedev/deploy-os-code-llm#azure), [Lambda](https://lambdalabs.com/), or [other clouds](https://github.com/continuedev/deploy-os-code-llm#others-2) using: - -- [HuggingFace TGI](https://github.com/continuedev/deploy-os-code-llm#tgi) -- [vLLM](https://github.com/continuedev/deploy-os-code-llm#vllm) -- [SkyPilot](https://github.com/continuedev/deploy-os-code-llm#skypilot) -- [Anyscale Private Endpoints](https://github.com/continuedev/deploy-os-code-llm#anyscale-private-endpoints) (OpenAI compatible API) -- [Lambda](https://github.com/continuedev/deploy-os-code-llm#lambda) - -## Self-hosting an open-source model - -For many cases, either Continue will have a built-in provider or the API you use will be OpenAI-compatible, in which case you can use the "openai" provider and change the "baseUrl" to point to the server. - -However, if neither of these are the case, you will need to wire up a new LLM object. - -## Authentication - -Basic authentication can be done with any provider using the `apiKey` field: - -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Ollama", - "provider": "ollama", - "model": "llama2-7b", - "apiKey": "xxx" - } - ] -} -``` - -This translates to the header `"Authorization": "Bearer xxx"`. - -If you need to send custom headers for authentication, you may use the `requestOptions.headers` property like in this example with Ollama: - -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Ollama", - "provider": "ollama", - "model": "llama2-7b", - "requestOptions": { - "headers": { - "X-Auth-Token": "xxx" - } - } - } - ] -} -``` - -Similarly if your model requires a Certificate for authentication, you may use the `requestOptions.clientCertificate` property like in the example below: - -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Ollama", - "provider": "ollama", - "model": "llama2-7b", - "requestOptions": { - "clientCertificate": { - "cert": "C:\tempollama.pem", - "key": "C:\tempollama.key", - "passphrase": "c0nt!nu3" - } - } - } - ] -} -``` diff --git a/docs/docs/customize/tutorials/how-to-self-host-a-model.mdx b/docs/docs/customize/tutorials/how-to-self-host-a-model.mdx new file mode 100644 index 000000000..3652cd43c --- /dev/null +++ b/docs/docs/customize/tutorials/how-to-self-host-a-model.mdx @@ -0,0 +1,118 @@ +--- +title: How to self-host a model +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +You can deploy a model in your [AWS](https://github.com/continuedev/deploy-os-code-llm#aws), [GCP](https://github.com/continuedev/deploy-os-code-llm#gcp), [Azure](https://github.com/continuedev/deploy-os-code-llm#azure), [Lambda](https://lambdalabs.com/), or [other clouds](https://github.com/continuedev/deploy-os-code-llm#others-2) using: + +- [HuggingFace TGI](https://github.com/continuedev/deploy-os-code-llm#tgi) +- [vLLM](https://github.com/continuedev/deploy-os-code-llm#vllm) +- [SkyPilot](https://github.com/continuedev/deploy-os-code-llm#skypilot) +- [Anyscale Private Endpoints](https://github.com/continuedev/deploy-os-code-llm#anyscale-private-endpoints) (OpenAI compatible API) +- [Lambda](https://github.com/continuedev/deploy-os-code-llm#lambda) + +## Self-hosting an open-source model + +For many cases, either Continue will have a built-in provider or the API you use will be OpenAI-compatible, in which case you can use the "openai" provider and change the "baseUrl" to point to the server. + +However, if neither of these are the case, you will need to wire up a new LLM object. + +## Authentication + +Basic authentication can be done with any provider using the `apiKey` field: + + + + ```yaml title="Package or config.yaml" + models: + - name: Ollama + provider: ollama + model: llama2-7b + apiKey: xxx + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Ollama", + "provider": "ollama", + "model": "llama2-7b", + "apiKey": "xxx" + } + ] + ``` + + + +This translates to the header `"Authorization": "Bearer xxx"`. + +If you need to send custom headers for authentication, you may use the `requestOptions.headers` property like in this example with Ollama: + + + + ```yaml title="Package or config.yaml" + models: + - name: Ollama + provider: ollama + model: llama2-7b + requestOptions: + headers: + X-Auth-Token: xxx + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Ollama", + "provider": "ollama", + "model": "llama2-7b", + "requestOptions": { + "headers": { + "X-Auth-Token": "xxx" + } + } + } + ] + ``` + + + +Similarly if your model requires a Certificate for authentication, you may use the `requestOptions.clientCertificate` property like in the example below: + + + + ```yaml title="config.yaml" + models: + - name: Ollama + provider: ollama + model: llama2-7b + requestOptions: + clientCertificate: + cert: C:\tempollama.pem + key: C:\tempollama.key + passphrase: c0nt!nu3 + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Ollama", + "provider": "ollama", + "model": "llama2-7b", + "requestOptions": { + "clientCertificate": { + "cert": "C:\\tempollama.pem", + "key": "C:\\tempollama.key", + "passphrase": "c0nt!nu3" + } + } + } + ] + ``` + + diff --git a/docs/docs/customize/tutorials/llama3.1.md b/docs/docs/customize/tutorials/llama3.1.md deleted file mode 100644 index 038055265..000000000 --- a/docs/docs/customize/tutorials/llama3.1.md +++ /dev/null @@ -1,134 +0,0 @@ ---- -title: Using Llama 3.1 with Continue -description: How to use Llama 3.1 with Continue -keywords: [llama, meta, togetherai, novita, ollama, replicate] ---- - -Continue makes it easy to code with the latest open-source models, including the entire Llama 3.1 family of models. Llama 3.2 models are also supported but not recommended for chat, because they are specifically designed to be small or multi-modal. - -If you haven't already installed Continue, you can do that [here for VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) or [here for JetBrains](https://plugins.jetbrains.com/plugin/22707-continue). For more general information on customizing Continue, read [our customization docs](../overview.md). - -Below we share some of the easiest ways to get up and running, depending on your use-case. - -## Ollama - -Ollama is the fastest way to get up and running with local language models. We recommend trying Llama 3.1 8b, which is impressive for its size and will perform well on most hardware. - -1. Download Ollama [here](https://ollama.ai/) (it should walk you through the rest of these steps) -2. Open a terminal and run `ollama run llama3.1:8b` -3. Change your Continue config file like this: - -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Llama 3.1 8b", - "provider": "ollama", - "model": "llama3.1-8b" - } - ] -} -``` - -## Groq - -Groq provides the fastest available inference for open-source language models, including the entire Llama 3.1 family. - -1. Obtain an API key [here](https://console.groq.com/keys) -2. Update your Continue config file like this: - -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Llama 3.1 405b", - "provider": "groq", - "model": "llama3.1-405b", - "apiKey": "" - } - ] -} -``` - -## Together AI - -Together AI provides fast and reliable inference of open-source models. You'll be able to run the 405b model with good speed. - -1. Create an account [here](https://api.together.xyz/signup) -2. Copy your API key that appears on the welcome screen -3. Update your Continue config file like this: - -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Llama 3.1 405b", - "provider": "together", - "model": "llama3.1-405b", - "apiKey": "" - } - ] -} -``` - -## Replicate - -Replicate makes it easy to host and run open-source AI with an API. - -1. Get your Replicate API key [here](https://replicate.ai/) -2. Change your Continue config file like this: - -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Llama 3.1 405b", - "provider": "replicate", - "model": "llama3.1-405b", - "apiKey": "" - } - ] -} -``` - -## SambaNova - -SambaNova Cloud provides world record Llama3.1 70B/405B serving. - -1. Create an account [here](https://cloud.sambanova.ai/) -2. Copy your API key -3. Update your Continue config file like this: - -```json title="~/.continue/config.json" -{ - "models": [ - { - "title": "SambaNova Llama 3.1 405B", - "provider": "sambanova", - "model": "llama3.1-405b", - "apiKey": "YOUR_API_KEY" - } - ] -} -``` - -## Cerebras Inference - -Cerebras Inference uses specialized silicon to provides fast inference for the Llama3.1 8B/70B. - -1. Create an account in the portal [here](https://cloud.cerebras.ai/). -2. Create and copy the API key for use in Continue. -3. Update your Continue config file: - -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Cerebras Llama 3.1 70B", - "provider": "cerebras", - "model": "llama3.1-70b", - "apiKey": "YOUR_API_KEY" - } - ] -} -``` diff --git a/docs/docs/customize/tutorials/llama3.1.mdx b/docs/docs/customize/tutorials/llama3.1.mdx new file mode 100644 index 000000000..ed6a7bf18 --- /dev/null +++ b/docs/docs/customize/tutorials/llama3.1.mdx @@ -0,0 +1,202 @@ +--- +title: Using Llama 3.1 with Continue +description: How to use Llama 3.1 with Continue +keywords: [llama, meta, togetherai, novita, ollama, replicate] +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +Continue makes it easy to code with the latest open-source models, including the entire Llama 3.1 family of models. Llama 3.2 models are also supported but not recommended for chat, because they are specifically designed to be small or multi-modal. + +If you haven't already installed Continue, you can do that [here for VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) or [here for JetBrains](https://plugins.jetbrains.com/plugin/22707-continue). For more general information on customizing Continue, read [our customization docs](../overview.md). + +Below we share some of the easiest ways to get up and running, depending on your use-case. + +## Ollama + +Ollama is the fastest way to get up and running with local language models. We recommend trying Llama 3.1 8b, which is impressive for its size and will perform well on most hardware. + +1. Download Ollama [here](https://ollama.ai/) (it should walk you through the rest of these steps) +2. Open a terminal and run `ollama run llama3.1:8b` +3. Change your Continue config file like this: + + + + ```yaml title="Package or config.yaml" + models: + - name: Llama 3.1 8b + provider: ollama + model: llama3.1-8b + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama 3.1 8b", + "provider": "ollama", + "model": "llama3.1-8b" + } + ] + ``` + + + +## Groq + +Groq provides the fastest available inference for open-source language models, including the entire Llama 3.1 family. + +1. Obtain an API key [here](https://console.groq.com/keys) +2. Update your Continue config file like this: + + + + ```yaml title="config.yaml" + models: + - name: Llama 3.1 405b + provider: groq + model: llama3.1-405b + apiKey: ${{ secrets.GROQ_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama 3.1 405b", + "provider": "groq", + "model": "llama3.1-405b", + "apiKey": "" + } + ] + ``` + + + +## Together AI + +Together AI provides fast and reliable inference of open-source models. You'll be able to run the 405b model with good speed. + +1. Create an account [here](https://api.together.xyz/signup) +2. Copy your API key that appears on the welcome screen +3. Update your Continue config file like this: + + + + ```yaml title="Package or config.yaml" + models: + - name: Llama 3.1 405b + provider: together + model: llama3.1-405b + apiKey: ${{ secrets.TOGETHER_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama 3.1 405b", + "provider": "together", + "model": "llama3.1-405b", + "apiKey": "" + } + ] + ``` + + + +## Replicate + +Replicate makes it easy to host and run open-source AI with an API. + +1. Get your Replicate API key [here](https://replicate.ai/) +2. Change your Continue config file like this: + + + + ```yaml title="Package or config.yaml" + models: + - name: Llama 3.1 405b + provider: replicate + model: llama3.1-405b + apiKey: ${{ secrets.REPLICATE_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama 3.1 405b", + "provider": "replicate", + "model": "llama3.1-405b", + "apiKey": "" + } + ] + ``` + + + +## SambaNova + +SambaNova Cloud provides world record Llama3.1 70B/405B serving. + +1. Create an account [here](https://cloud.sambanova.ai/) +2. Copy your API key +3. Update your Continue config file like this: + + + + ```yaml title="config.yaml" + models: + - name: SambaNova Llama 3.1 405B + provider: sambanova + model: llama3.1-405b + apiKey: ${{ secrets.SAMBA_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "SambaNova Llama 3.1 405B", + "provider": "sambanova", + "model": "llama3.1-405b", + "apiKey": "SAMBA_API_KEY" + } + ] + ``` + + + +## Cerebras Inference + +Cerebras Inference uses specialized silicon to provides fast inference for the Llama3.1 8B/70B. + +1. Create an account in the portal [here](https://cloud.cerebras.ai/). +2. Create and copy the API key for use in Continue. +3. Update your Continue config file: + + + + ```yaml title="Package or config.yaml" + models: + - name: Cerebras Llama 3.1 70B + provider: cerebras + model: llama3.1-70b + apiKey: ${{ secrets.ANTHROPIC_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Cerebras Llama 3.1 70B", + "provider": "cerebras", + "model": "llama3.1-70b", + "apiKey": "" + } + ] + ``` + + diff --git a/docs/docs/customize/tutorials/running-continue-without-internet.md b/docs/docs/customize/tutorials/running-continue-without-internet.md index c945f8c43..81ecbc7c3 100644 --- a/docs/docs/customize/tutorials/running-continue-without-internet.md +++ b/docs/docs/customize/tutorials/running-continue-without-internet.md @@ -9,4 +9,4 @@ Continue can be run even on an air-gapped computer if you use a local model. Onl 1. Download the latest .vsix file from the [Open VSX Registry](https://open-vsx.org/extension/Continue/continue) and [install it to VS Code](https://code.visualstudio.com/docs/editor/extension-marketplace#_install-from-a-vsix). 2. Open `~/.continue/config.json` and set `"allowAnonymousTelemetry": false`. This will stop Continue from attempting requests to PostHog for [anonymous telemetry](../../telemetry.md). 3. Also in `config.json`, set the default model to a local model. You can available options [here](../model-providers/). -4. Restart VS Code to ensure that the changes to `config.json` take effect. +4. Restart VS Code to ensure that the changes to `config.json` or `config.yaml` take effect. diff --git a/docs/docs/customize/tutorials/set-up-codestral.md b/docs/docs/customize/tutorials/set-up-codestral.mdx similarity index 59% rename from docs/docs/customize/tutorials/set-up-codestral.md rename to docs/docs/customize/tutorials/set-up-codestral.mdx index 426a0037f..026948f8a 100644 --- a/docs/docs/customize/tutorials/set-up-codestral.md +++ b/docs/docs/customize/tutorials/set-up-codestral.mdx @@ -4,6 +4,9 @@ description: How to set up Codestral keywords: [codestral, mistral, model setup] --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + ![mistral x continue](../../../static/img/mistral-x-continue.png) **Here is a step-by-step guide on how to set up Codestral with Continue using the Mistral AI API:** @@ -14,11 +17,25 @@ keywords: [codestral, mistral, model setup] 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: +4. To use Codestral as your model for both `autocomplete` and `chat`, insert your Mistral API key below and add it to your configuration file: -```json title="config.json (Deprecated)" -{ - "models": [ + + + ```yaml title="config.yaml" + models: + - name: Codestral + provider: mistral + model: codestral-latest + apiKey: ${{ secrets.CODESTRAL_API_KEY }} + apiBase: https://codestral.mistral.ai/v1 + roles: + - chat + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" + "models": [ { "title": "Codestral", "provider": "mistral", @@ -26,16 +43,17 @@ keywords: [codestral, mistral, model setup] "apiKey": "[API_KEY]", "apiBase": "https://codestral.mistral.ai/v1" } - ], - "tabAutocompleteModel": { - "title": "Codestral", - "provider": "mistral", - "model": "codestral-latest", - "apiKey": "[API_KEY]", - "apiBase": "https://codestral.mistral.ai/v1" - } -} -``` + ], + "tabAutocompleteModel": { + "title": "Codestral", + "provider": "mistral", + "model": "codestral-latest", + "apiKey": "[API_KEY]", + "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) diff --git a/docs/docs/edit/how-it-works.md b/docs/docs/edit/how-it-works.md index 19f107782..453d1e98f 100644 --- a/docs/docs/edit/how-it-works.md +++ b/docs/docs/edit/how-it-works.md @@ -11,4 +11,4 @@ The model response is then streamed directly back to the highlighted range in yo If you accept the diff, we remove the previously highlighted lines, and if you reject the diff, we remove the proposed changes. -If you would like to view the exact prompt that is sent to the model during an edit, you can [view this in the prompt logs](troubleshooting.md#check-the-logs). +If you would like to view the exact prompt that is sent to the model during an edit, you can [view this in the prompt logs](../troubleshooting.mdx#check-the-logs). diff --git a/docs/docs/edit/how-to-customize.mdx b/docs/docs/edit/how-to-customize.mdx index 677a38642..d7ebf4e77 100644 --- a/docs/docs/edit/how-to-customize.mdx +++ b/docs/docs/edit/how-to-customize.mdx @@ -20,7 +20,7 @@ You can configure a particular model to be used for Edit: model: claude-3-5-sonnet-latest roles: - edit - apiKeySecret: ANTHOPIC_API_KEY + apiKey: ${{ secrets.ANTHROPIC_API_KEY }} ``` diff --git a/docs/docs/edit/model-setup.md b/docs/docs/edit/model-setup.md index 64f5f69d6..ad884b334 100644 --- a/docs/docs/edit/model-setup.md +++ b/docs/docs/edit/model-setup.md @@ -5,6 +5,6 @@ description: How to set up an Edit model keywords: [edit, cmd l, model] --- -By default, Edit uses the [same model as Chat](chat/model-setup.mdx) since we recommend a similar, 400B+ parameter model or one of the frontier model for code edits. +By default, Edit uses the [same model as Chat](../chat/model-setup.mdx) since we recommend a similar, 400B+ parameter model or one of the frontier model for code edits. You can configure a different model to be used for edits by updating your [configuration](../reference.md). diff --git a/docs/docs/json-reference.md b/docs/docs/json-reference.md index 4faceb9a9..8b6f9e7f2 100644 --- a/docs/docs/json-reference.md +++ b/docs/docs/json-reference.md @@ -5,7 +5,7 @@ keywords: [config, config_schema.json, json] --- :::info -`config.json` has been deprecated in favor of the [`YAML Config Format`](./yaml-reference). See the [migration guide](./yaml-migration). +`config.json` has been deprecated in favor of the [`YAML Config Format`](./reference). See the [migration guide](./yaml-migration). ::: Below are details for each property that can be set in `config.json`. The config schema code is found in [`extensions/vscode/config_schema.json`](https://github.com/continuedev/continue/blob/main/extensions/vscode/config_schema.json). @@ -27,7 +27,7 @@ Each model has specific configuration options tailored to its provider and funct - `contextLength`: Maximum context length of the model, typically in tokens (default: 2048). - `maxStopWords`: Maximum number of stop words allowed, to avoid API errors with extensive lists. - `template`: Chat template to format messages. Auto-detected for most models but can be overridden. See intelliJ suggestions. -- `promptTemplates`: A mapping of prompt template names (e.g., `edit`) to template strings. [Customization Guide](https://docs.continue.dev/model-setup/configuration#customizing-the-edit-prompt). +- `promptTemplates`: A mapping of prompt template names (e.g., `edit`) to template strings. [Customization Guide](/model-setup/configuration#customizing-the-edit-prompt). - `completionOptions`: Model-specific completion options, same format as top-level [`completionOptions`](#completionoptions), which they override. - `systemMessage`: A system message that will precede responses from the LLM. - `requestOptions`: Model-specific HTTP request options, same format as top-level [`requestOptions`](#requestoptions), which they override. diff --git a/docs/docs/reference.md b/docs/docs/reference.md index 3b86fb248..c2c34b09f 100644 --- a/docs/docs/reference.md +++ b/docs/docs/reference.md @@ -116,7 +116,7 @@ models: The `context` section defines context providers, which supply additional information or context to the language models. Each context provider can be configured with specific parameters. -More information about usage/params for each context provider can be found [here](/customize/context-providers) +More information about usage/params for each context provider can be found [here](/customize/context-providers.mdx) **Properties:** diff --git a/docs/docs/telemetry.md b/docs/docs/telemetry.md index d4fc97840..58be882e1 100644 --- a/docs/docs/telemetry.md +++ b/docs/docs/telemetry.md @@ -26,24 +26,14 @@ The following usage information is collected and reported: ## How to Opt Out -You can disable anonymous telemetry by modifying the `config.json` file located in the `~/.continue` directory. This file typically includes the following entry: - -```json title="config.json (Deprecated)" -{ - "allowAnonymousTelemetry": true -} -``` - -To opt out, change the value of `allowAnonymousTelemetry` to `false`. Alternatively, you can disable telemetry through your VS Code settings by unchecking the "Continue: Telemetry Enabled" box. - -### Steps to Disable Telemetry via Configuration File +### Via `config.json` File 1. Open the `~/.continue/config.json` file in your text editor. -2. Locate the `"allowAnonymousTelemetry"` setting. +2. Locate and/or add the `"allowAnonymousTelemetry"` setting. 3. Change the value from `true` to `false`. 4. Save the file. -### Steps to Disable Telemetry via VS Code Settings +### Via VS Code Settings 1. Open VS Code. 2. Navigate to `File` > `Preferences` > `Settings` (or use the keyboard shortcut ctrl + , on Windows/Linux or cmd + , on macOS). diff --git a/docs/docs/troubleshooting.mdx b/docs/docs/troubleshooting.mdx index 3b2713323..4b0e35941 100644 --- a/docs/docs/troubleshooting.mdx +++ b/docs/docs/troubleshooting.mdx @@ -88,7 +88,7 @@ If your keyboard shortcuts are not resolving, you may have other commands that a #### Configure Certificates -If you're seeing a `fetch failed` error and your network requires custom certificates, you will need to configure them in `config.json`. In each of the objects in the `"models"` array, add `requestOptions.caBundlePath` like this: +If you're seeing a `fetch failed` error and your network requires custom certificates, you will need to configure them in your config file. In each of the objects in the `"models"` array, add `requestOptions.caBundlePath` like this: diff --git a/docs/docs/yaml-migration.md b/docs/docs/yaml-migration.md index f6a70bc64..79a3906fa 100644 --- a/docs/docs/yaml-migration.md +++ b/docs/docs/yaml-migration.md @@ -37,11 +37,10 @@ Add all model configurations in `config.json`, including models in `models`, `ta - `inlineEdit` -> e.g. `roles: [chat, edit]` - `applyCodeBlock` -> e.g. `roles: [chat, apply]` -Model-level `requestOptions` remain, with minor changes. See [YAML Continue Config Reference](/yaml-reference#requestoptions) +Model-level `requestOptions` remain, with minor changes. See [YAML Continue Config Reference](/reference#requestoptions) -Model-level `completionOptions` are replaced by `defaultCompletionOptions`, with minor changes. See [YAML Continue Config Reference](/yaml-reference#completionoptions) +Model-level `completionOptions` are replaced by `defaultCompletionOptions`, with minor changes. See [YAML Continue Config Reference](/reference#completionoptions) - **Before** @@ -103,7 +102,7 @@ models: - name: GPT-4 provider: openai model: gpt-4 - apiKey: + apiKey: ${{ secrets.OPENAI_KEY }} defaultCompletionOptions: temperature: 0.5 maxTokens: 2000 @@ -113,7 +112,7 @@ models: - name: My Voyage Reranker provider: voyage - apiKey: + apiKey: ${{ secrets.VOYAGE_KEY }} roles: - rerank @@ -125,7 +124,7 @@ models: - name: My Ada Embedder provider: openai - apiKey: + apiKey: ${{ secrets.ADA_API_KEY }} roles: - embed @@ -139,7 +138,7 @@ models: apiBase: http://3.3.3.3/v1 requestOptions: headers: - X-Auth-Token: + X-Auth-Token: ${{ secrets.CUSTOM_API_KEY }} roles: - chat - apply @@ -325,13 +324,16 @@ mcpServers: ## Deprecated configuration options -The following top-level fields from `config.json` have been deprecated. Most UI-related and user-specific options will move into a settings page in the UI +The following top-level fields are not yet supported in the YAML config file, and you will need to stick with `config.json` to use them for now - Slash commands (JSON `slashCommands`) - top-level `requestOptions` - top-level `completionOptions` - `tabAutocompleteOptions` - `analytics` + +The following top-level fields from `config.json` have been deprecated. Most UI-related and user-specific options will move into a settings page in the UI + - `customCommands` - `disableSessionTitles` - `experimental` @@ -342,4 +344,4 @@ The following top-level fields from `config.json` have been deprecated. Most UI- ## New Configuration options -The YAML configuration format offers new configuration options not available in the JSON format. See the [YAML Config Reference](/yaml-reference) for more information. +The YAML configuration format offers new configuration options not available in the JSON format. See the [YAML Config Reference](./reference) for more information. From ca1d2f49d9572198591924358bed5e7ee302df6d Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Fri, 17 Jan 2025 17:35:37 -0800 Subject: [PATCH 011/316] fix build errors --- docs/docs/customize/model-types/embeddings.mdx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/docs/customize/model-types/embeddings.mdx b/docs/docs/customize/model-types/embeddings.mdx index 3f3d76dda..edb6921f7 100644 --- a/docs/docs/customize/model-types/embeddings.mdx +++ b/docs/docs/customize/model-types/embeddings.mdx @@ -5,6 +5,9 @@ keywords: [embedding] sidebar_position: 3 --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + An "embeddings model" is trained to convert a piece of text into a vector, which can later be rapidly compared to other vectors to determine similarity between the pieces of text. Embeddings models are typically much smaller than LLMs, and will be extremely fast and cheap in comparison. In Continue, embeddings are generated during indexing and then used by [@Codebase](../deep-dives/codebase.mdx) to perform similarity search over your codebase. From a9db81cbe27ec73a902d55b5b0d4047b561d0bae Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Fri, 17 Jan 2025 18:24:14 -0800 Subject: [PATCH 012/316] fix broken docs links --- docs/docs/actions/how-it-works.mdx | 2 +- docs/docs/chat/context-selection.md | 2 +- docs/docs/customize/context-providers.mdx | 2 +- docs/docs/customize/model-types/chat.md | 2 +- docs/docs/customize/overview.md | 2 +- docs/docs/customize/tools.mdx | 4 ++-- .../customize/tutorials/build-your-own-context-provider.md | 2 +- docs/docs/customize/tutorials/build-your-own-slash-command.md | 2 +- docs/docs/json-reference.md | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/docs/actions/how-it-works.mdx b/docs/docs/actions/how-it-works.mdx index afb1b2396..90bd4bb20 100644 --- a/docs/docs/actions/how-it-works.mdx +++ b/docs/docs/actions/how-it-works.mdx @@ -7,6 +7,6 @@ sidebar_position: 4 While many Actions are based on templated prompts and can be customized with .prompt files, there are a number that execute more complex code under the hood. -Actions that generate inline diffs, like “/edit”, “/comment”, or right click actions, use the same prompt and response processing logic as [Edit](edit/how-it-works). +Actions that generate inline diffs, like “/edit”, “/comment”, or right click actions, use the same prompt and response processing logic as [Edit](../edit/how-it-works.md). To learn how other slash commands work, see the full reference [here](../customize/slash-commands.mdx). diff --git a/docs/docs/chat/context-selection.md b/docs/docs/chat/context-selection.md index f93a6a93e..aa1d052fe 100644 --- a/docs/docs/chat/context-selection.md +++ b/docs/docs/chat/context-selection.md @@ -23,7 +23,7 @@ You can include a specific file in your current workspace as context by typing [ ## Specific folder -You can include a folder in your current workspace as context by typing [`@Folder`](../customize/context-providers.mdx#folder) and selecting the directory. It [works like `@Codebase`](../customize/deep-dives/codebase.md) but only includes the files in the selected folder. +You can include a folder in your current workspace as context by typing [`@Folder`](../customize/context-providers.mdx#folder) and selecting the directory. It [works like `@Codebase`](../customize/deep-dives/codebase.mdx) but only includes the files in the selected folder. ## Codebase search diff --git a/docs/docs/customize/context-providers.mdx b/docs/docs/customize/context-providers.mdx index cd7c5a5e7..2833d45a3 100644 --- a/docs/docs/customize/context-providers.mdx +++ b/docs/docs/customize/context-providers.mdx @@ -490,7 +490,7 @@ You'll then be able to type "@" and see "MCP" in the context providers dropdown. ### Prompt Files -See [Prompt Files](/customize/deep-dives/prompt-file.mdx). Prompt files are not added directly to the config file; prompt files are parsed and injected into the config automatically, to be used like other context providers. +See [Prompt Files](./deep-dives/prompt-files.md). Prompt files are not added directly to the config file; prompt files are parsed and injected into the config automatically, to be used like other context providers. ### `@Issue` diff --git a/docs/docs/customize/model-types/chat.md b/docs/docs/customize/model-types/chat.md index 447021251..e5fb7e3d4 100644 --- a/docs/docs/customize/model-types/chat.md +++ b/docs/docs/customize/model-types/chat.md @@ -15,4 +15,4 @@ Otherwise, some of the next best options are: - [GPT-4o](../model-providers/top-level/openai.mdx) - [Gemini 1.5 Pro](../model-providers/top-level/gemini.mdx) -- [Llama3.1 405B](../tutorials/llama3.1.md) +- [Llama3.1 405B](../tutorials/llama3.1.mdx) diff --git a/docs/docs/customize/overview.md b/docs/docs/customize/overview.md index fdbd1a61e..6104799b9 100644 --- a/docs/docs/customize/overview.md +++ b/docs/docs/customize/overview.md @@ -25,7 +25,7 @@ You can easily access config file from the Continue Chat sidebar. Open the sideb ![configure-continue](/img/configure-continue.png) -When editing this file, you can see the available options suggested as you type, or you can check the [full reference](./deep-dives/configuration.mdx). +When editing this file, you can see the available options suggested as you type, or you can check the [full reference](./deep-dives/configuration.md). :::info diff --git a/docs/docs/customize/tools.mdx b/docs/docs/customize/tools.mdx index 6fac7f651..1c2d9a97a 100644 --- a/docs/docs/customize/tools.mdx +++ b/docs/docs/customize/tools.mdx @@ -9,8 +9,8 @@ import TabItem from "@theme/TabItem"; Tools allow Continue to take action in your IDE and beyond (when you give permission). Currently, they are only supported for the following providers: -- [Anthropic](./model-providers/top-level/anthropic.md) - see recommended models [here](https://docs.anthropic.com/en/docs/build-with-claude/tool-use#choosing-a-model). -- [Ollama](./model-providers/top-level/ollama.md) - see recommended models [here](https://ollama.com/search?c=tools). +- [Anthropic](./model-providers/top-level/anthropic.mdx) - see recommended models [here](https://docs.anthropic.com/en/docs/build-with-claude/tool-use#choosing-a-model). +- [Ollama](./model-providers/top-level/ollama.mdx) - see recommended models [here](https://ollama.com/search?c=tools). To use tools, click on the icon in the input toolbar like below. diff --git a/docs/docs/customize/tutorials/build-your-own-context-provider.md b/docs/docs/customize/tutorials/build-your-own-context-provider.md index 53c40f910..00140013e 100644 --- a/docs/docs/customize/tutorials/build-your-own-context-provider.md +++ b/docs/docs/customize/tutorials/build-your-own-context-provider.md @@ -3,7 +3,7 @@ title: Build your own context provider --- :::info -Custom context providers are added through `~/config.ts`, which has been deprecated in favor of the [`YAML Config Format`](../reference.md). We recommend looking into [Prompt Files](../deep-dives/prompt-files.md) and [MCP Servers](../context-providers.mdx#modelcontextprotocol) to achieve similar functionality. +Custom context providers are added through `~/config.ts`, which has been deprecated in favor of the [`YAML Config Format`](../../reference.md). We recommend looking into [Prompt Files](../deep-dives/prompt-files.md) and [MCP Servers](../context-providers.mdx#modelcontextprotocol) to achieve similar functionality. ::: ## Introductory Example diff --git a/docs/docs/customize/tutorials/build-your-own-slash-command.md b/docs/docs/customize/tutorials/build-your-own-slash-command.md index 1692970fc..d3f9d3c11 100644 --- a/docs/docs/customize/tutorials/build-your-own-slash-command.md +++ b/docs/docs/customize/tutorials/build-your-own-slash-command.md @@ -3,7 +3,7 @@ title: Build your own slash command --- :::info -Slash commands can currently only be added using [`config.json`](../json-reference.md) or `config.ts`, which have been deprecated in favor of the [`YAML Config Format`](../reference.md). We recommend looking into [Prompt Files](../customize/deep-dives//prompt-files.md) to achieve similar functionality. +Slash commands can currently only be added using [`config.json`](../../json-reference.md) or `config.ts`, which have been deprecated in favor of the [`YAML Config Format`](../../reference.md). We recommend looking into [Prompt Files](../deep-dives/prompt-files.md) to achieve similar functionality. ::: There are two ways to add custom slash commands: diff --git a/docs/docs/json-reference.md b/docs/docs/json-reference.md index 8b6f9e7f2..59a15d572 100644 --- a/docs/docs/json-reference.md +++ b/docs/docs/json-reference.md @@ -27,7 +27,7 @@ Each model has specific configuration options tailored to its provider and funct - `contextLength`: Maximum context length of the model, typically in tokens (default: 2048). - `maxStopWords`: Maximum number of stop words allowed, to avoid API errors with extensive lists. - `template`: Chat template to format messages. Auto-detected for most models but can be overridden. See intelliJ suggestions. -- `promptTemplates`: A mapping of prompt template names (e.g., `edit`) to template strings. [Customization Guide](/model-setup/configuration#customizing-the-edit-prompt). +- `promptTemplates`: A mapping of prompt template names (e.g., `edit`) to template strings. (DEPRECATED) - `completionOptions`: Model-specific completion options, same format as top-level [`completionOptions`](#completionoptions), which they override. - `systemMessage`: A system message that will precede responses from the LLM. - `requestOptions`: Model-specific HTTP request options, same format as top-level [`requestOptions`](#requestoptions), which they override. From 8ecff56c533072ce40bd3d09066da969cc766823 Mon Sep 17 00:00:00 2001 From: boowangoo Date: Tue, 21 Jan 2025 18:25:34 -0500 Subject: [PATCH 013/316] Add deepseek-reasoner (R1) --- gui/src/pages/AddNewModel/AddNewModel.tsx | 2 +- gui/src/pages/AddNewModel/configs/models.ts | 13 +++++++++++++ gui/src/pages/AddNewModel/configs/providers.ts | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/gui/src/pages/AddNewModel/AddNewModel.tsx b/gui/src/pages/AddNewModel/AddNewModel.tsx index 5b9687537..d74cbf25c 100644 --- a/gui/src/pages/AddNewModel/AddNewModel.tsx +++ b/gui/src/pages/AddNewModel/AddNewModel.tsx @@ -49,7 +49,7 @@ const modelsByProvider: Record = { models.mistralLarge, ], Cohere: [models.commandR, models.commandRPlus], - DeepSeek: [models.deepseekCoderApi, models.deepseekChatApi], + DeepSeek: [models.deepseekCoderApi, models.deepseekChatApi, models.deepseekReasonerApi], Gemini: [models.geminiPro, models.gemini15Pro, models.gemini15Flash], "Open Source": [models.llama3Chat, models.mistralOs, models.deepseek], }; diff --git a/gui/src/pages/AddNewModel/configs/models.ts b/gui/src/pages/AddNewModel/configs/models.ts index 8116c86ba..2761a725e 100644 --- a/gui/src/pages/AddNewModel/configs/models.ts +++ b/gui/src/pages/AddNewModel/configs/models.ts @@ -230,6 +230,19 @@ export const models: { [key: string]: ModelPackage } = { providerOptions: ["deepseek"], isOpenSource: false, }, + deepseekReasonerApi: { + title: "DeepSeek Reasoner", + description: + "An open-source reasoning model which generates a chain of thought to enhance the accuracy of its responses.", + params: { + title: "DeepSeek Reasoner", + model: "deepseek-reasoner", + contextLength: 64_000, + }, + icon: "deepseek.png", + providerOptions: ["deepseek"], + isOpenSource: true, + }, deepseekCoder2Lite: { title: "DeepSeek Coder 2 Lite", description: diff --git a/gui/src/pages/AddNewModel/configs/providers.ts b/gui/src/pages/AddNewModel/configs/providers.ts index 4890d5c2b..bf6fe735d 100644 --- a/gui/src/pages/AddNewModel/configs/providers.ts +++ b/gui/src/pages/AddNewModel/configs/providers.ts @@ -370,7 +370,7 @@ Select the \`GPT-4o\` model below to complete your provider configuration, but n required: true, }, ], - packages: [models.deepseekCoderApi, models.deepseekChatApi], + packages: [models.deepseekCoderApi, models.deepseekChatApi, models.deepseekReasonerApi], apiKeyUrl: "https://platform.deepseek.com/api_keys", }, together: { From 344241bcdae4ce004d0eb4405bf8273988e4f0c5 Mon Sep 17 00:00:00 2001 From: Adam Shedivy Date: Wed, 22 Jan 2025 13:21:39 -0600 Subject: [PATCH 014/316] run config reload with additional context providers --- core/config/ConfigHandler.ts | 6 +++--- core/config/ProfileLifecycleManager.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/config/ConfigHandler.ts b/core/config/ConfigHandler.ts index 24987528a..af454a4f0 100644 --- a/core/config/ConfigHandler.ts +++ b/core/config/ConfigHandler.ts @@ -286,11 +286,11 @@ export class ConfigHandler { this.updateListeners.push(listener); } - async reloadConfig() { + async reloadConfig(additionalContextProviders: IContextProvider[] = []) { // TODO: this isn't right, there are two different senses in which you want to "reload" const { config, errors, configLoadInterrupted } = - await this.currentProfile.reloadConfig(); + await this.currentProfile.reloadConfig(additionalContextProviders); if (config) { this.inactiveProfiles.forEach((profile) => profile.clearConfig()); @@ -340,6 +340,6 @@ export class ConfigHandler { registerCustomContextProvider(contextProvider: IContextProvider) { this.additionalContextProviders.push(contextProvider); - void this.reloadConfig(); + void this.reloadConfig(this.additionalContextProviders); } } diff --git a/core/config/ProfileLifecycleManager.ts b/core/config/ProfileLifecycleManager.ts index 88fc387c5..ea4e14a79 100644 --- a/core/config/ProfileLifecycleManager.ts +++ b/core/config/ProfileLifecycleManager.ts @@ -32,12 +32,12 @@ export class ProfileLifecycleManager { } // Clear saved config and reload - async reloadConfig(): Promise> { + async reloadConfig(additionalContextProviders: IContextProvider[] = []): Promise> { this.savedConfigResult = undefined; this.savedBrowserConfigResult = undefined; this.pendingConfigPromise = undefined; - return this.loadConfig([], true); + return this.loadConfig(additionalContextProviders, true); } async loadConfig( From e23e9c9a7184e622332eeb2d004b1d673f20bdbd Mon Sep 17 00:00:00 2001 From: Nate Date: Sat, 25 Jan 2025 12:21:58 -0800 Subject: [PATCH 015/316] jb-onboarding flow --- core/control-plane/auth/index.ts | 3 +- core/core.ts | 5 +- core/protocol/core.ts | 2 +- .../ContinuePluginStartupActivity.kt | 2 +- .../auth/ContinueAuthDialog.kt | 7 +- .../auth/ContinueAuthService.kt | 30 ++++-- .../continue/IdeProtocolClient.kt | 2 +- .../continue/IntelliJIde.kt | 1 + .../continueintellijextension/protocol/ide.kt | 2 +- .../ContinueExtensionSettingsService.kt | 14 ++- .../continueintellijextension/types.kt | 3 +- gui/src/components/AccountDialog.tsx | 96 ++++++++++--------- 12 files changed, 103 insertions(+), 64 deletions(-) diff --git a/core/control-plane/auth/index.ts b/core/control-plane/auth/index.ts index 8965f4fdb..a3441ab65 100644 --- a/core/control-plane/auth/index.ts +++ b/core/control-plane/auth/index.ts @@ -4,13 +4,14 @@ import { getControlPlaneEnv } from "../env"; export async function getAuthUrlForTokenPage( ideSettingsPromise: Promise, + useOnboarding: boolean, ): Promise { const env = await getControlPlaneEnv(ideSettingsPromise); const url = new URL("https://api.workos.com/user_management/authorize"); const params = { response_type: "code", client_id: env.WORKOS_CLIENT_ID, - redirect_uri: `${env.APP_URL}tokens/callback`, + redirect_uri: `${env.APP_URL}tokens/${useOnboarding ? "onboarding-" : ""}callback`, // redirect_uri: "http://localhost:3000/tokens/callback", state: uuidv4(), provider: "authkit", diff --git a/core/core.ts b/core/core.ts index cf24053b4..6c5572bdb 100644 --- a/core/core.ts +++ b/core/core.ts @@ -873,7 +873,10 @@ export class Core { this.configHandler.updateControlPlaneSessionInfo(msg.data.sessionInfo); }); on("auth/getAuthUrl", async (msg) => { - const url = await getAuthUrlForTokenPage(ideSettingsPromise); + const url = await getAuthUrlForTokenPage( + ideSettingsPromise, + msg.data.useOnboarding, + ); return { url }; }); diff --git a/core/protocol/core.ts b/core/protocol/core.ts index 52cffb027..72801a908 100644 --- a/core/protocol/core.ts +++ b/core/protocol/core.ts @@ -185,7 +185,7 @@ export type ToCoreFromIdeOrWebviewProtocol = { "profiles/switch": [{ id: string }, undefined]; - "auth/getAuthUrl": [undefined, { url: string }]; + "auth/getAuthUrl": [{ useOnboarding: boolean }, { url: string }]; "tools/call": [ { toolCall: ToolCall; selectedModelTitle: string }, { contextItems: ContextItem[] }, diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt index 72819421a..2fcb7066d 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt @@ -196,7 +196,7 @@ class ContinuePluginStartupActivity : StartupActivity, DumbAware { connection.subscribe(AuthListener.TOPIC, object : AuthListener { override fun startAuthFlow() { - authService.startAuthFlow(project) + authService.startAuthFlow(project, false) } override fun handleUpdatedSessionInfo(sessionInfo: ControlPlaneSessionInfo?) { diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/auth/ContinueAuthDialog.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/auth/ContinueAuthDialog.kt index b8a862fad..b9faf65d7 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/auth/ContinueAuthDialog.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/auth/ContinueAuthDialog.kt @@ -7,7 +7,8 @@ import javax.swing.JComponent import javax.swing.JPanel import java.awt.BorderLayout -class ContinueAuthDialog(private val onTokenEntered: (String) -> Unit) : DialogWrapper(true) { +class ContinueAuthDialog(private val useOnboarding: Boolean, private val onTokenEntered: (String) -> Unit) : + DialogWrapper(true) { private val tokenField = JBTextField() init { @@ -17,7 +18,9 @@ class ContinueAuthDialog(private val onTokenEntered: (String) -> Unit) : DialogW override fun createCenterPanel(): JComponent { val panel = JPanel(BorderLayout()) - panel.add(JBLabel("Please enter your Continue authentication token:"), BorderLayout.NORTH) + val message = + if (useOnboarding) "After onboarding you will be shown an authentication token. Please enter it here:" else "Please enter your Continue authentication token:" + panel.add(JBLabel(message), BorderLayout.NORTH) panel.add(tokenField, BorderLayout.CENTER) return panel } diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/auth/ContinueAuthService.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/auth/ContinueAuthService.kt index d23308cf1..639e4d442 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/auth/ContinueAuthService.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/auth/ContinueAuthService.kt @@ -33,8 +33,18 @@ class ContinueAuthService { private const val REFRESH_TOKEN_KEY = "ContinueRefreshToken" private const val ACCOUNT_ID_KEY = "ContinueAccountId" private const val ACCOUNT_LABEL_KEY = "ContinueAccountLabel" - private const val CONTROL_PLANE_URL = "https://control-plane-api-service-i3dqylpbqa-uc.a.run.app" -// private const val CONTROL_PLANE_URL = "http://localhost:3001" + } + + private fun getControlPlaneUrl(): String { + val env = service().continueState.continueTestEnvironment; + when (env) { + "none" -> return "https://control-plane-api-service-i3dqylpbqa-uc.a.run.app" + "local" -> return "http://localhost:3001" + "production" -> return "https://api.continue.dev" + "test" -> return "https://api-test.continue.dev" + } + + return "https://control-plane-api-service-i3dqylpbqa-uc.a.run.app" } init { @@ -44,13 +54,13 @@ class ContinueAuthService { } } - fun startAuthFlow(project: Project) { + fun startAuthFlow(project: Project, useOnboarding: Boolean) { // Open login page - openSignInPage(project) + openSignInPage(project, useOnboarding) // Open a dialog where the user should paste their sign-in token ApplicationManager.getApplication().invokeLater { - val dialog = ContinueAuthDialog() { token -> + val dialog = ContinueAuthDialog(useOnboarding) { token -> // Store the token updateRefreshToken(token) } @@ -111,7 +121,7 @@ class ContinueAuthService { private suspend fun refreshToken(refreshToken: String) = withContext(Dispatchers.IO) { val client = OkHttpClient() - val url = URL(CONTROL_PLANE_URL).toURI().resolve("/auth/refresh").toURL() + val url = URL(getControlPlaneUrl()).toURI().resolve("/auth/refresh").toURL() val jsonBody = mapOf("refreshToken" to refreshToken) val jsonString = Gson().toJson(jsonBody) val requestBody = jsonString.toRequestBody("application/json".toMediaType()) @@ -132,9 +142,13 @@ class ContinueAuthService { } - private fun openSignInPage(project: Project) { + private fun openSignInPage(project: Project, useOnboarding: Boolean) { val coreMessenger = project.service().coreMessenger - coreMessenger?.request("auth/getAuthUrl", null, null) { response -> + coreMessenger?.request( + "auth/getAuthUrl", mapOf( + "useOnboarding" to useOnboarding + ), null + ) { response -> val authUrl = ((response as? Map<*, *>)?.get("content") as? Map<*, *>)?.get("url") as? String if (authUrl != null) { // Open the auth URL in the browser diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IdeProtocolClient.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IdeProtocolClient.kt index 0a0b6b83a..674b991f7 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IdeProtocolClient.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IdeProtocolClient.kt @@ -97,7 +97,7 @@ class IdeProtocolClient( val sessionInfo = authService.loadControlPlaneSessionInfo() respond(sessionInfo) } else { - authService.startAuthFlow(project) + authService.startAuthFlow(project, params.useOnboarding) respond(null) } } diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IntelliJIde.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IntelliJIde.kt index d30a5d5fe..3b59c2503 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IntelliJIde.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IntelliJIde.kt @@ -93,6 +93,7 @@ class IntelliJIDE( remoteConfigSyncPeriod = settings.continueState.remoteConfigSyncPeriod, userToken = settings.continueState.userToken ?: "", enableControlServerBeta = settings.continueState.enableContinueTeamsBeta, + continueTestEnvironment = settings.continueState.continueTestEnvironment, pauseCodebaseIndexOnStart = false, // TODO: Needs to be implemented enableDebugLogs = false // TODO: Needs to be implemented ) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/protocol/ide.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/protocol/ide.kt index 4aa433f52..5ce49e80a 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/protocol/ide.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/protocol/ide.kt @@ -2,7 +2,7 @@ package com.github.continuedev.continueintellijextension.protocol import com.github.continuedev.continueintellijextension.* -data class GetControlPlaneSessionInfoParams(val silent: Boolean) +data class GetControlPlaneSessionInfoParams(val silent: Boolean, val useOnboarding: Boolean) data class WriteFileParams( val path: String, diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinueExtensionSettingsService.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinueExtensionSettingsService.kt index ce548e5f5..4901bd018 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinueExtensionSettingsService.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinueExtensionSettingsService.kt @@ -2,6 +2,7 @@ package com.github.continuedev.continueintellijextension.services import com.github.continuedev.continueintellijextension.constants.getConfigJsPath import com.github.continuedev.continueintellijextension.constants.getConfigJsonPath +import com.intellij.execution.target.value.constant import com.intellij.openapi.application.ApplicationInfo import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.components.* @@ -33,6 +34,7 @@ class ContinueSettingsComponent : DumbAware { val enableOSR: JCheckBox = JCheckBox("Enable Off-Screen Rendering") val displayEditorTooltip: JCheckBox = JCheckBox("Display Editor Tooltip") val showIDECompletionSideBySide: JCheckBox = JCheckBox("Show IDE completions side-by-side") + val continueTestEnvironment: JComboBox = JComboBox(arrayOf("none", "production", "test", "local")) init { val constraints = GridBagConstraints() @@ -66,6 +68,11 @@ class ContinueSettingsComponent : DumbAware { constraints.gridy++ panel.add(showIDECompletionSideBySide, constraints) constraints.gridy++ + panel.add(JLabel("Continue test environment"), constraints) + constraints.gridy++ + constraints.gridy++ + panel.add(continueTestEnvironment, constraints) + constraints.gridy++ // Add a "filler" component that takes up all remaining vertical space constraints.weighty = 1.0 @@ -98,6 +105,7 @@ open class ContinueExtensionSettings : PersistentStateComponent

Account

@@ -89,53 +89,57 @@ export default function AccountDialog() { -
- Current workspace + {controlServerBetaEnabled && ( +
+ Current workspace - - {({ open }) => ( -
- - {selectedProfile?.title} -
-
-
+ + {({ open }) => ( +
+ + + {selectedProfile?.title} + +
+
+
- - - {profiles.map((option, idx) => ( - - - {option.title} - - - ))} - {profiles.length === 0 && ( -
- No workspaces found -
- )} -
-
-
- )} -
-
+ + + {profiles.map((option, idx) => ( + + + {option.title} + + + ))} + {profiles.length === 0 && ( +
+ No workspaces found +
+ )} +
+
+
+ )} + +
+ )}
From dbab35643689138c1764ffbda124a8dbaaee10e2 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Tue, 28 Jan 2025 14:28:15 -0800 Subject: [PATCH 016/316] remove view history message --- core/protocol/ideWebview.ts | 4 ---- .../actions/ContinuePluginActions.kt | 3 ++- extensions/vscode/src/commands.ts | 2 +- gui/src/components/Layout.tsx | 13 ------------- 4 files changed, 3 insertions(+), 19 deletions(-) diff --git a/core/protocol/ideWebview.ts b/core/protocol/ideWebview.ts index 9cc19504d..3598e06ea 100644 --- a/core/protocol/ideWebview.ts +++ b/core/protocol/ideWebview.ts @@ -79,10 +79,6 @@ export type ToWebviewFromIdeProtocol = ToWebviewFromIdeOrCoreProtocol & { navigateTo: [{ path: string; toggle?: boolean }, void]; addModel: [undefined, void]; - /** - * @deprecated Use navigateTo with a path instead. - */ - viewHistory: [undefined, void]; focusContinueSessionId: [{ sessionId: string | undefined }, void]; newSession: [undefined, void]; setTheme: [{ theme: any }, void]; diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/actions/ContinuePluginActions.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/actions/ContinuePluginActions.kt index 852fb4f02..6a3150145 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/actions/ContinuePluginActions.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/actions/ContinuePluginActions.kt @@ -113,7 +113,8 @@ class NewContinueSessionAction : AnAction() { class ViewHistoryAction : AnAction() { override fun actionPerformed(e: AnActionEvent) { val continuePluginService = getContinuePluginService(e.project) ?: return - continuePluginService.sendToWebview("viewHistory", null) + val params = mapOf("path" to "/history", "toggle" to true) + continuePluginService.sendToWebview("navigateTo", params) } } diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index d8019cfe1..66072e9b9 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -708,7 +708,7 @@ const getCommandsMap: ( sidebar.webviewProtocol?.request("newSession", undefined); }, "continue.viewHistory": () => { - sidebar.webviewProtocol?.request("viewHistory", undefined); + vscode.commands.executeCommand("continue.navigateTo", "/history", true); }, "continue.focusContinueSessionId": async ( sessionId: string | undefined, diff --git a/gui/src/components/Layout.tsx b/gui/src/components/Layout.tsx index cadaa5830..e18becbf7 100644 --- a/gui/src/components/Layout.tsx +++ b/gui/src/components/Layout.tsx @@ -122,19 +122,6 @@ const Layout = () => { [navigate], ); - useWebviewListener( - "viewHistory", - async () => { - // Toggle the history page / main page - if (location.pathname === "/history") { - navigate("/"); - } else { - navigate("/history"); - } - }, - [location, navigate], - ); - useWebviewListener( "navigateTo", async (data) => { From 3b539d53c39a98c361e27db6dfb72a8e14ddae50 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Tue, 28 Jan 2025 16:06:49 -0800 Subject: [PATCH 017/316] feat: assistant select --- binary/package-lock.json | 2 +- core/config/ConfigHandler.ts | 18 +- core/config/ProfileLifecycleManager.ts | 2 + core/config/profile/PlatformProfileLoader.ts | 6 +- extensions/vscode/package-lock.json | 6 +- gui/src/components/Layout.tsx | 10 - gui/src/components/PageHeader.tsx | 32 ++- gui/src/components/mainInput/InputToolbar.tsx | 7 +- .../platform/AssistantAndModelSelect.tsx | 194 ------------------ .../modelSelection/platform/AssistantIcon.tsx | 17 ++ .../platform/AssistantSelect.tsx | 178 ++++++++-------- .../platform/AssistantSelectOptions.tsx | 120 +++++++++++ .../modelSelection/platform/ModelSelect.tsx | 121 ----------- .../modelSelection/platform/shared.tsx | 1 - .../modelSelection/platform/utils.ts | 6 + gui/src/index.css | 2 - gui/src/pages/More/More.tsx | 2 +- gui/src/pages/gui/Chat.tsx | 21 +- gui/src/pages/history/index.tsx | 2 +- gui/src/util/index.ts | 5 + 20 files changed, 289 insertions(+), 463 deletions(-) delete mode 100644 gui/src/components/modelSelection/platform/AssistantAndModelSelect.tsx create mode 100644 gui/src/components/modelSelection/platform/AssistantIcon.tsx create mode 100644 gui/src/components/modelSelection/platform/AssistantSelectOptions.tsx delete mode 100644 gui/src/components/modelSelection/platform/ModelSelect.tsx create mode 100644 gui/src/components/modelSelection/platform/utils.ts diff --git a/binary/package-lock.json b/binary/package-lock.json index 316fddcd2..84b831ecf 100644 --- a/binary/package-lock.json +++ b/binary/package-lock.json @@ -48,7 +48,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.16", + "@continuedev/config-yaml": "^1.0.23", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", diff --git a/core/config/ConfigHandler.ts b/core/config/ConfigHandler.ts index edcf62071..0badc4700 100644 --- a/core/config/ConfigHandler.ts +++ b/core/config/ConfigHandler.ts @@ -1,9 +1,17 @@ import * as fs from "node:fs"; +import { + AssistantUnrolled, + ConfigResult, + FullSlug, +} from "@continuedev/config-yaml"; +import * as YAML from "yaml"; + import { ControlPlaneClient, ControlPlaneSessionInfo, } from "../control-plane/client.js"; +import { getControlPlaneEnv, useHub } from "../control-plane/env.js"; import { BrowserSerializedContinueConfig, ContinueConfig, @@ -15,15 +23,8 @@ import { import Ollama from "../llm/llms/Ollama.js"; import { GlobalContext } from "../util/GlobalContext.js"; import { getConfigJsonPath, getConfigYamlPath } from "../util/paths.js"; - -import { - AssistantUnrolled, - ConfigResult, - FullSlug, -} from "@continuedev/config-yaml"; -import * as YAML from "yaml"; -import { getControlPlaneEnv, useHub } from "../control-plane/env.js"; import { localPathToUri } from "../util/pathToUri.js"; + import { LOCAL_ONBOARDING_CHAT_MODEL, ONBOARDING_LOCAL_MODEL_TITLE, @@ -135,6 +136,7 @@ export class ConfigHandler { { ...assistant.configResult, config: renderedConfig }, assistant.ownerSlug, assistant.packageSlug, + assistant.iconUrl, assistant.configResult.config?.version ?? "latest", this.controlPlaneClient, this.ide, diff --git a/core/config/ProfileLifecycleManager.ts b/core/config/ProfileLifecycleManager.ts index fa76c6b55..8216153ae 100644 --- a/core/config/ProfileLifecycleManager.ts +++ b/core/config/ProfileLifecycleManager.ts @@ -3,6 +3,7 @@ import { ConfigValidationError, FullSlug, } from "@continuedev/config-yaml"; + import { BrowserSerializedContinueConfig, ContinueConfig, @@ -18,6 +19,7 @@ export interface ProfileDescription { profileType: "control-plane" | "local" | "platform"; title: string; id: string; + iconUrl: string; errors: ConfigValidationError[] | undefined; } diff --git a/core/config/profile/PlatformProfileLoader.ts b/core/config/profile/PlatformProfileLoader.ts index 12e166c2d..7650cb0e3 100644 --- a/core/config/profile/PlatformProfileLoader.ts +++ b/core/config/profile/PlatformProfileLoader.ts @@ -1,10 +1,10 @@ +import { ConfigResult } from "@continuedev/config-yaml"; import { AssistantUnrolled } from "@continuedev/config-yaml/dist/schemas/index.js"; import { ControlPlaneClient } from "../../control-plane/client.js"; import { ContinueConfig, IDE, IdeSettings } from "../../index.js"; - -import { ConfigResult } from "@continuedev/config-yaml"; import { ProfileDescription } from "../ProfileLifecycleManager.js"; + import doLoadConfig from "./doLoadConfig.js"; import { IProfileLoader } from "./IProfileLoader.js"; @@ -27,6 +27,7 @@ export default class PlatformProfileLoader implements IProfileLoader { private configResult: ConfigResult, private readonly ownerSlug: string, private readonly packageSlug: string, + private readonly iconUrl: string, versionSlug: string, private readonly controlPlaneClient: ControlPlaneClient, private readonly ide: IDE, @@ -44,6 +45,7 @@ export default class PlatformProfileLoader implements IProfileLoader { }, title: `${ownerSlug}/${packageSlug}@${versionSlug}`, errors: configResult.errors, + iconUrl: this.iconUrl, }; } diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index cbc67ea38..4ca866899 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.255", + "version": "0.9.256", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.255", + "version": "0.9.256", "license": "Apache-2.0", "dependencies": { "@continuedev/fetch": "^1.0.3", @@ -106,7 +106,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.20", + "@continuedev/config-yaml": "^1.0.23", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", diff --git a/gui/src/components/Layout.tsx b/gui/src/components/Layout.tsx index cadaa5830..747c2ddab 100644 --- a/gui/src/components/Layout.tsx +++ b/gui/src/components/Layout.tsx @@ -29,16 +29,6 @@ const LayoutTopDiv = styled(CustomScrollbarDiv)` border-radius: ${defaultBorderRadius}; position: relative; overflow-x: hidden; - - &::after { - position: absolute; - content: ""; - width: 100%; - height: 1px; - background-color: rgba(136, 136, 136, 0.3); - top: 0; - left: 0; - } `; const GridDiv = styled.div` diff --git a/gui/src/components/PageHeader.tsx b/gui/src/components/PageHeader.tsx index 23e108c38..04317c947 100644 --- a/gui/src/components/PageHeader.tsx +++ b/gui/src/components/PageHeader.tsx @@ -1,20 +1,32 @@ import { ArrowLeftIcon } from "@heroicons/react/24/outline"; export interface PageHeaderProps { - onClick: () => void; - title: string; + onTitleClick?: () => void; + title?: string; + rightContent?: React.ReactNode; } -export default function PageHeader({ onClick, title }: PageHeaderProps) { +export default function PageHeader({ + onTitleClick, + title, + rightContent, +}: PageHeaderProps) { return ( -
-
- - {title} +
+
+ {title && ( +
+ + + {title} + +
+ )}
+
{rightContent}
); } diff --git a/gui/src/components/mainInput/InputToolbar.tsx b/gui/src/components/mainInput/InputToolbar.tsx index 7ce52bec4..93b437fdc 100644 --- a/gui/src/components/mainInput/InputToolbar.tsx +++ b/gui/src/components/mainInput/InputToolbar.tsx @@ -10,7 +10,7 @@ import { vscInputBackground, } from ".."; import { useAppDispatch, useAppSelector } from "../../redux/hooks"; -import { selectUseActiveFile, selectUsePlatform } from "../../redux/selectors"; +import { selectUseActiveFile } from "../../redux/selectors"; import { selectDefaultModel } from "../../redux/slices/configSlice"; import { selectHasCodeToEdit, @@ -26,7 +26,6 @@ import { } from "../../util"; import { ToolTip } from "../gui/Tooltip"; import ModelSelect from "../modelSelection/ModelSelect"; -import AssistantAndModelSelect from "../modelSelection/platform/AssistantAndModelSelect"; import HoverItem from "./InputToolbar/HoverItem"; import ToggleToolsButton from "./InputToolbar/ToggleToolsButton"; @@ -97,8 +96,6 @@ function InputToolbar(props: InputToolbarProps) { modelSupportsTools(defaultModel.model, defaultModel.provider) && !props.toolbarOptions?.hideTools; - const usePlatform = useAppSelector(selectUsePlatform); - const supportsImages = defaultModel && modelSupportsImages( @@ -117,7 +114,7 @@ function InputToolbar(props: InputToolbarProps) { className="find-widget-skip flex" >
- {usePlatform ? : } +
{props.toolbarOptions?.hideImageUpload || (supportsImages && ( diff --git a/gui/src/components/modelSelection/platform/AssistantAndModelSelect.tsx b/gui/src/components/modelSelection/platform/AssistantAndModelSelect.tsx deleted file mode 100644 index c33c3a586..000000000 --- a/gui/src/components/modelSelection/platform/AssistantAndModelSelect.tsx +++ /dev/null @@ -1,194 +0,0 @@ -import { Popover } from "@headlessui/react"; -import { - ChevronDownIcon, - DocumentIcon, - SparklesIcon, -} from "@heroicons/react/24/outline"; -import { useEffect, useRef, useState } from "react"; -import styled from "styled-components"; -import { defaultBorderRadius, lightGray, vscInputBackground } from "../.."; -import { useAuth } from "../../../context/Auth"; -import AddModelForm from "../../../forms/AddModelForm"; -import { useAppDispatch, useAppSelector } from "../../../redux/hooks"; -import { - cycleDefaultModel, - selectDefaultModel, -} from "../../../redux/slices/configSlice"; -import { setDialogMessage, setShowDialog } from "../../../redux/slices/uiSlice"; -import { cycleProfile } from "../../../redux/thunks/cycleProfile"; -import { getFontSize, isMetaEquivalentKeyPressed } from "../../../util"; -import PopoverTransition from "../../mainInput/InputToolbar/PopoverTransition"; -import { AssistantSelect } from "./AssistantSelect"; -import { ModelSelect, modelSelectTitle } from "./ModelSelect"; -import { MAX_HEIGHT_PX } from "./shared"; - -const StyledPopoverButton = styled(Popover.Button)` - font-family: inherit; - display: flex; - align-items: center; - gap: 2px; - border: none; - cursor: pointer; - font-size: ${getFontSize() - 2}px; - background: transparent; - color: ${lightGray}; - &:focus { - outline: none; - } -`; - -const StyledPopoverPanel = styled(Popover.Panel)<{ $showabove: boolean }>` - margin-top: 4px; - position: absolute; - padding: 0px; - cursor: default; - - display: flex; - flex-direction: row; - - border-radius: ${defaultBorderRadius}; - border: 0.5px solid ${lightGray}; - background-color: ${vscInputBackground}; - - ${(props) => (props.$showabove ? "bottom: 100%;" : "top: 100%;")} -`; - -function AssistantAndModelSelect() { - const dispatch = useAppDispatch(); - const defaultModel = useAppSelector(selectDefaultModel); - const [showAbove, setShowAbove] = useState(false); - const buttonRef = useRef(null); - const selectedProfileId = useAppSelector( - (store) => store.session.selectedProfileId, - ); - - const { profiles, selectedProfile } = useAuth(); - - useEffect(() => { - const handleResize = () => calculatePosition(); - window.addEventListener("resize", handleResize); - return () => window.removeEventListener("resize", handleResize); - }, []); - - function calculatePosition() { - if (!buttonRef.current) { - return; - } - const rect = buttonRef.current.getBoundingClientRect(); - const spaceBelow = window.innerHeight - rect.bottom; - const spaceAbove = rect.top; - const dropdownHeight = MAX_HEIGHT_PX; - - setShowAbove(spaceBelow < dropdownHeight && spaceAbove > spaceBelow); - } - - function onClickAddModel(e: any) { - e.stopPropagation(); - e.preventDefault(); - - // Close the dropdown - if (buttonRef.current) { - buttonRef.current.click(); - } - dispatch(setShowDialog(true)); - dispatch( - setDialogMessage( - { - dispatch(setShowDialog(false)); - }} - />, - ), - ); - } - - useEffect(() => { - let lastToggleTime = 0; - const DEBOUNCE_MS = 500; - - const handleKeyDown = (event: KeyboardEvent) => { - if (event.key === "'" && isMetaEquivalentKeyPressed(event as any)) { - const now = Date.now(); - - if (event.shiftKey) { - dispatch(cycleDefaultModel("next")); - } else { - if (now - lastToggleTime >= DEBOUNCE_MS) { - dispatch(cycleProfile()); - lastToggleTime = now; - } - } - } - }; - - window.addEventListener("keydown", handleKeyDown); - return () => { - window.removeEventListener("keydown", handleKeyDown); - }; - }, []); - - return ( - -
- -
- {selectedProfile?.id === "local" ? ( - <> -
-
- - - { - if (buttonRef.current) { - buttonRef.current.click(); - } - }} - /> - - - -
-
- ); -} - -export default AssistantAndModelSelect; diff --git a/gui/src/components/modelSelection/platform/AssistantIcon.tsx b/gui/src/components/modelSelection/platform/AssistantIcon.tsx new file mode 100644 index 000000000..fb9346bbf --- /dev/null +++ b/gui/src/components/modelSelection/platform/AssistantIcon.tsx @@ -0,0 +1,17 @@ +import { ProfileDescription } from "core/config/ProfileLifecycleManager"; +import { isLocalProfile } from "../../../util"; +import { ComputerDesktopIcon, SparklesIcon } from "@heroicons/react/24/outline"; + +export interface AssistantIconProps { + assistant: ProfileDescription; +} + +export default function AssistantIcon({ assistant }: AssistantIconProps) { + if (isLocalProfile(assistant)) { + return ; + } else if (!assistant.iconUrl) { + return ; + } else { + return ; + } +} diff --git a/gui/src/components/modelSelection/platform/AssistantSelect.tsx b/gui/src/components/modelSelection/platform/AssistantSelect.tsx index 972dd2782..248beee42 100644 --- a/gui/src/components/modelSelection/platform/AssistantSelect.tsx +++ b/gui/src/components/modelSelection/platform/AssistantSelect.tsx @@ -1,113 +1,95 @@ +import { Popover } from "@headlessui/react"; import { - DocumentIcon, - PlusIcon, + ChevronDownIcon, + ComputerDesktopIcon, SparklesIcon, } from "@heroicons/react/24/outline"; -import { useContext } from "react"; -import { lightGray } from "../.."; +import { cloneElement, useEffect, useRef } from "react"; import { useAuth } from "../../../context/Auth"; -import { IdeMessengerContext } from "../../../context/IdeMessenger"; import { useAppDispatch } from "../../../redux/hooks"; -import { setDialogMessage, setShowDialog } from "../../../redux/slices/uiSlice"; -import { setProfileId } from "../../../redux/thunks/setProfileId"; -import { getFontSize, getMetaKeyLabel } from "../../../util"; -import AboutAssistantDialog from "../../dialogs/AboutAssistantDialog"; -import { Divider, Option, OptionDiv } from "./shared"; - -interface AssistantSelectProps { - onClose: () => void; -} - -export function AssistantSelect(props: AssistantSelectProps) { - const ideMessenger = useContext(IdeMessengerContext); - const { profiles, selectedProfile } = useAuth(); +import { cycleProfile } from "../../../redux/thunks/cycleProfile"; +import { + getFontSize, + isLocalProfile, + isMetaEquivalentKeyPressed, +} from "../../../util"; +import PopoverTransition from "../../mainInput/InputToolbar/PopoverTransition"; +import { AssistantSelectOptions } from "./AssistantSelectOptions"; +import AssistantIcon from "./AssistantIcon"; +import { getProfileDisplayText } from "./utils"; +export default function AssistantSelect() { const dispatch = useAppDispatch(); + const buttonRef = useRef(null); + const { selectedProfile } = useAuth(); - function onNewAssistant() { - ideMessenger.post("controlPlane/openUrl", { - path: "new", - }); + const isLocalProfileSelected = + selectedProfile && isLocalProfile(selectedProfile); + + useEffect(() => { + let lastToggleTime = 0; + const DEBOUNCE_MS = 500; + + const handleKeyDown = (event: KeyboardEvent) => { + if ( + event.key === "'" && + isMetaEquivalentKeyPressed(event as any) && + event.shiftKey + ) { + const now = Date.now(); + + if (now - lastToggleTime >= DEBOUNCE_MS) { + dispatch(cycleProfile()); + lastToggleTime = now; + } + } + }; + + window.addEventListener("keydown", handleKeyDown); + return () => { + window.removeEventListener("keydown", handleKeyDown); + }; + }, []); + + if (!selectedProfile) { + return null; } return ( -
-
- {profiles.map((option, idx) => ( - - ))} -
- -
- -
- - New Assistant -
-
- - - - +
+ - {getMetaKeyLabel()}' toggle assistant - +
+
+ +
+ + {getProfileDisplayText(selectedProfile)} + +
+
+ + + + { + if (buttonRef.current) { + buttonRef.current.click(); + } + }} + /> + +
-
+ ); } diff --git a/gui/src/components/modelSelection/platform/AssistantSelectOptions.tsx b/gui/src/components/modelSelection/platform/AssistantSelectOptions.tsx new file mode 100644 index 000000000..3ff7a755a --- /dev/null +++ b/gui/src/components/modelSelection/platform/AssistantSelectOptions.tsx @@ -0,0 +1,120 @@ +import { PlusIcon } from "@heroicons/react/24/outline"; +import { useContext } from "react"; +import { lightGray } from "../.."; +import { useAuth } from "../../../context/Auth"; +import { IdeMessengerContext } from "../../../context/IdeMessenger"; +import { useAppDispatch } from "../../../redux/hooks"; +import { setDialogMessage, setShowDialog } from "../../../redux/slices/uiSlice"; +import { setProfileId } from "../../../redux/thunks/setProfileId"; +import { getFontSize, getMetaKeyLabel, isLocalProfile } from "../../../util"; +import AboutAssistantDialog from "../../dialogs/AboutAssistantDialog"; +import { Divider, Option, OptionDiv } from "./shared"; +import { getProfileDisplayText } from "./utils"; +import AssistantIcon from "./AssistantIcon"; + +interface AssistantSelectOptionsProps { + onClose: () => void; +} + +export function AssistantSelectOptions(props: AssistantSelectOptionsProps) { + const ideMessenger = useContext(IdeMessengerContext); + const { profiles, selectedProfile } = useAuth(); + const dispatch = useAppDispatch(); + + function onNewAssistant() { + ideMessenger.post("controlPlane/openUrl", { + path: "platform/new", + }); + } + + function handleOptionLink(e: React.MouseEvent, profileId: string) { + e.stopPropagation(); + e.preventDefault(); + ideMessenger.post("config/openProfile", { profileId }); + } + + function handleConfigure(e: React.MouseEvent, option: any) { + e.stopPropagation(); + e.preventDefault(); + + if (option.id === "local") { + ideMessenger.post("config/openProfile", { profileId: option.id }); + } else { + props.onClose(); + dispatch(setDialogMessage()); + dispatch(setShowDialog(true)); + } + } + + function handleClickError(profileId: string) { + ideMessenger.post("config/openProfile", { profileId }); + } + + return ( +
+
+ {profiles.map((profile, idx) => ( + + ))} +
+ +
+ +
+ + New Assistant +
+
+ + + + + {getMetaKeyLabel()} ⇧ ' to toggle + +
+
+ ); +} diff --git a/gui/src/components/modelSelection/platform/ModelSelect.tsx b/gui/src/components/modelSelection/platform/ModelSelect.tsx deleted file mode 100644 index 80ad7179a..000000000 --- a/gui/src/components/modelSelection/platform/ModelSelect.tsx +++ /dev/null @@ -1,121 +0,0 @@ -import { CubeIcon, PlusIcon } from "@heroicons/react/24/outline"; -import { useContext, useEffect, useState } from "react"; -import { lightGray } from "../.."; -import { IdeMessengerContext } from "../../../context/IdeMessenger"; -import { useAppDispatch, useAppSelector } from "../../../redux/hooks"; -import { - selectDefaultModel, - setDefaultModel, -} from "../../../redux/slices/configSlice"; -import { getFontSize, getMetaKeyLabel } from "../../../util"; -import { Divider, Option, OptionDiv } from "./shared"; - -export interface ModelOption { - value: string; - title: string; - apiKey?: string; -} - -export function modelSelectTitle(model: any): string { - if (model?.title) return model?.title; - if (model?.model !== undefined && model?.model.trim() !== "") { - if (model?.class_name) { - return `${model?.class_name} - ${model?.model}`; - } - return model?.model; - } - return model?.class_name; -} - -interface ModelSelectProps { - selectedProfileId: string; - onClickAddModel: (e: any) => void; -} - -export function ModelSelect(props: ModelSelectProps) { - const dispatch = useAppDispatch(); - const ideMessenger = useContext(IdeMessengerContext); - const defaultModel = useAppSelector(selectDefaultModel); - const allModels = useAppSelector((state) => state.config.config.models); - const [options, setOptions] = useState([]); - const [sortedOptions, setSortedOptions] = useState([]); - - // Sort so that options without an API key are at the end - useEffect(() => { - const enabledOptions = options.filter((option) => option.apiKey !== ""); - const disabledOptions = options.filter((option) => option.apiKey === ""); - - const sorted = [...enabledOptions, ...disabledOptions]; - - setSortedOptions(sorted); - }, [options]); - - useEffect(() => { - setOptions( - allModels.map((model) => { - return { - value: model.title, - title: modelSelectTitle(model), - apiKey: model.apiKey, - }; - }), - ); - }, [allModels]); - - function onModelChange(modelTitle: string) { - if (modelTitle === defaultModel?.title) return; - dispatch(setDefaultModel({ title: modelTitle })); - } - - return ( -
-
- {sortedOptions.map((option, idx) => ( - - ))} -
- -
- {props.selectedProfileId === "local" && ( - <> - -
- - Add Chat model -
-
- - )} - - - - - {getMetaKeyLabel()}⇧' toggle model - -
-
- ); -} diff --git a/gui/src/components/modelSelection/platform/shared.tsx b/gui/src/components/modelSelection/platform/shared.tsx index d860cab49..bb94188a9 100644 --- a/gui/src/components/modelSelection/platform/shared.tsx +++ b/gui/src/components/modelSelection/platform/shared.tsx @@ -13,7 +13,6 @@ export const OptionDiv = styled.div<{ isDisabled?: boolean; isSelected?: boolean; }>` - border-radius: ${defaultBorderRadius}; padding: 6px 12px; min-width: 0px; diff --git a/gui/src/components/modelSelection/platform/utils.ts b/gui/src/components/modelSelection/platform/utils.ts new file mode 100644 index 000000000..4a8ac8bd0 --- /dev/null +++ b/gui/src/components/modelSelection/platform/utils.ts @@ -0,0 +1,6 @@ +import { ProfileDescription } from "core/config/ProfileLifecycleManager"; +import { isLocalProfile } from "../../../util"; + +export function getProfileDisplayText(profile: ProfileDescription): string { + return isLocalProfile(profile) ? profile.title : profile.fullSlug.packageSlug; +} diff --git a/gui/src/index.css b/gui/src/index.css index 93ccd384f..4a2270c95 100644 --- a/gui/src/index.css +++ b/gui/src/index.css @@ -7,8 +7,6 @@ --vsc-background: rgb(30, 30, 30); --button-color: rgb(113, 28, 59); --button-color-hover: rgba(113, 28, 59, 0.667); - --def-border-radius: 5px; - --vscode-editor-background: rgb(30, 30, 30); --vscode-editor-foreground: rgb(197, 200, 198); --vscode-textBlockQuote-background: rgba(255, 255, 255, 1); diff --git a/gui/src/pages/More/More.tsx b/gui/src/pages/More/More.tsx index b543353b7..360a5951f 100644 --- a/gui/src/pages/More/More.tsx +++ b/gui/src/pages/More/More.tsx @@ -27,7 +27,7 @@ function MorePage() { return (
- navigate("/")} title="Chat" /> + navigate("/")} title="Chat" />
diff --git a/gui/src/pages/gui/Chat.tsx b/gui/src/pages/gui/Chat.tsx index 1bb5f5714..b5568931e 100644 --- a/gui/src/pages/gui/Chat.tsx +++ b/gui/src/pages/gui/Chat.tsx @@ -77,6 +77,7 @@ import { ToolCallDiv } from "./ToolCallDiv"; import { ToolCallButtons } from "./ToolCallDiv/ToolCallButtonsDiv"; import ToolOutput from "./ToolCallDiv/ToolOutput"; import FreeTrialOverDialog from "../../components/dialogs/FreeTrialOverDialog"; +import AssistantSelect from "../../components/modelSelection/platform/AssistantSelect"; const StopButton = styled.div` background-color: ${vscBackground}; @@ -366,17 +367,25 @@ export function Chat() { return ( <> - {isInEditMode && ( + {(isInEditMode || usePlatform) && ( { - await dispatch(loadLastSession({ saveCurrentSession: false })); - dispatch(exitEditMode()); - }} + title={isInEditMode ? "Edit Mode" : ""} + onTitleClick={ + isInEditMode + ? async () => { + await dispatch( + loadLastSession({ saveCurrentSession: false }), + ); + dispatch(exitEditMode()); + } + : undefined + } + rightContent={usePlatform && } /> )} {widget} + 0 ? "flex-1" : ""}`} diff --git a/gui/src/pages/history/index.tsx b/gui/src/pages/history/index.tsx index 54b6cea0a..0d3c3429e 100644 --- a/gui/src/pages/history/index.tsx +++ b/gui/src/pages/history/index.tsx @@ -8,7 +8,7 @@ export default function HistoryPage() { return (
- navigate("/")} title="Chat" /> + navigate("/")} title="Chat" />
); diff --git a/gui/src/util/index.ts b/gui/src/util/index.ts index 233589f34..cb00d2680 100644 --- a/gui/src/util/index.ts +++ b/gui/src/util/index.ts @@ -1,6 +1,7 @@ import _ from "lodash"; import { getLocalStorage } from "./localStorage"; import { KeyboardEvent } from "react"; +import { ProfileDescription } from "core/config/ProfileLifecycleManager"; type Platform = "mac" | "linux" | "windows" | "unknown"; @@ -105,3 +106,7 @@ export function updatedObj(old: any, pathToValue: { [key: string]: any }) { return newObject; } + +export function isLocalProfile(profile: ProfileDescription): boolean { + return profile.id === "local"; +} From 249a35430819e9650d130eef828aa359c2a5febb Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Tue, 28 Jan 2025 16:07:38 -0800 Subject: [PATCH 018/316] Update AssistantIcon.tsx --- gui/src/components/modelSelection/platform/AssistantIcon.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/src/components/modelSelection/platform/AssistantIcon.tsx b/gui/src/components/modelSelection/platform/AssistantIcon.tsx index fb9346bbf..64adb7e46 100644 --- a/gui/src/components/modelSelection/platform/AssistantIcon.tsx +++ b/gui/src/components/modelSelection/platform/AssistantIcon.tsx @@ -9,7 +9,7 @@ export interface AssistantIconProps { export default function AssistantIcon({ assistant }: AssistantIconProps) { if (isLocalProfile(assistant)) { return ; - } else if (!assistant.iconUrl) { + } else if (assistant.iconUrl) { return ; } else { return ; From e41a76435b5c4345c0839106a5931f8bbe8bea12 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Tue, 28 Jan 2025 16:30:33 -0800 Subject: [PATCH 019/316] Update AssistantSelectOptions.tsx --- .../modelSelection/platform/AssistantSelectOptions.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gui/src/components/modelSelection/platform/AssistantSelectOptions.tsx b/gui/src/components/modelSelection/platform/AssistantSelectOptions.tsx index 3ff7a755a..781d60437 100644 --- a/gui/src/components/modelSelection/platform/AssistantSelectOptions.tsx +++ b/gui/src/components/modelSelection/platform/AssistantSelectOptions.tsx @@ -51,7 +51,11 @@ export function AssistantSelectOptions(props: AssistantSelectOptionsProps) { } return ( -
+
+
+ Available Assistants +
+
{profiles.map((profile, idx) => (