json block titles

This commit is contained in:
Dallin Romney 2025-01-16 23:19:23 -08:00
parent 8e05a0f144
commit e2d5f9b3fb
21 changed files with 131 additions and 88 deletions

View file

@ -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": [

View file

@ -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",

View file

@ -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",

View file

@ -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
---

View file

@ -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:
}
]
}
```

View file

@ -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 | ✅ |

View file

@ -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
```

View file

@ -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)

View file

@ -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": [
{

View file

@ -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",

View file

@ -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
}
]
}
```

View file

@ -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
```

View file

@ -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).
You can build your own slash command by following [this tutorial](/customize/tutorials/build-your-own-slash-command).

View file

@ -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": [

View file

@ -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": {

View file

@ -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",
}
}
```

View file

@ -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:
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
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
```
</TabItem>
<TabItem value="json" label="JSON (Deprecated)">
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",
}
}
}
```
</TabItem>
</Tabs>

View file

@ -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": [
{

View file

@ -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
}
]
```

View file

@ -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": {

View file

@ -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": [
{