From e2d5f9b3fbe5cdc57fb3a319fdd0b283ae94a4b9 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Thu, 16 Jan 2025 23:19:23 -0800 Subject: [PATCH] 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": [ {