From 30ecadbdb803ca7d95cb7a7ecb943309a342447e Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Wed, 9 Apr 2025 13:13:29 -0700 Subject: [PATCH] docs: update docs w/ new `chatOptions` --- docs/docs/customize/model-roles/chat.mdx | 23 ----------------------- docs/docs/reference.md | 4 +++- 2 files changed, 3 insertions(+), 24 deletions(-) diff --git a/docs/docs/customize/model-roles/chat.mdx b/docs/docs/customize/model-roles/chat.mdx index 4d92d2c6e..aca683782 100644 --- a/docs/docs/customize/model-roles/chat.mdx +++ b/docs/docs/customize/model-roles/chat.mdx @@ -363,26 +363,3 @@ If your local machine can run a 16B parameter model, then we recommend running D ## Other experiences There are many more models and providers you can use with Chat beyond those mentioned above. Read more [here](../model-roles/chat.mdx) - -## Prompt templating - -You can customize the system prompt used for chat interactions by setting the `promptTemplates.baseSystemPrompt` property in your model configuration. Continue uses [Handlebars syntax](https://handlebarsjs.com/guide/) for templating. - -Available variables for the chat template: - -- `{{{history}}}` - The conversation history -- `{{{system_message}}}` - The default system message (if provided) - -Example: - -```yaml -models: - - name: My Custom Chat Model - provider: openai - model: gpt-4o - promptTemplates: - baseSystemPrompt: | - You are an expert coding assistant specialized in JavaScript development. - Always provide code examples when explaining concepts. - {{{system_message}}} -``` diff --git a/docs/docs/reference.md b/docs/docs/reference.md index 9e1af2d1a..dbfe30f52 100644 --- a/docs/docs/reference.md +++ b/docs/docs/reference.md @@ -145,7 +145,9 @@ The `models` section defines the language models used in your configuration. Mod - `apiBase`: Can be used to override the default API base that is specified per model - `roles`: An array specifying the roles this model can fulfill, such as `chat`, `autocomplete`, `embed`, `rerank`, `edit`, `apply`, `summarize`. The default value is `[chat, edit, apply, summarize]`. Note that the `summarize` role is not currently used. - `capabilities`: Array of strings denoting model capabilities, which will overwrite Continue's autodetection based on provider and model. Supported capabilities include `tool_use` and `image_input`. -- `promptTemplates`: Can be used to override the default prompt templates for different model roles. Valid values are [`edit`](./customize/model-roles/edit.mdx#prompt-templating), [`apply`](./customize/model-roles/apply.mdx#prompt-templating), and [`baseSystemPrompt`](./customize/model-roles/chat.mdx#prompt-templating) (used to override the system prompt in Chat and Agent). Handlebars syntax can be used to insert variables in your prompt. +- `promptTemplates`: Can be used to override the default prompt templates for different model roles. Valid values are [`edit`](./customize/model-roles/edit.mdx#prompt-templating) and [`apply`](./customize/model-roles/apply.mdx#prompt-templating). +- `chatOptions`: If the model includes role `chat`, these settings apply for Chat and Agent mode: + - `baseSystemPrompt`: Can be used to override the default system prompt. - `embedOptions`: If the model includes role `embed`, these settings apply for embeddings: - `maxChunkSize`: Maximum tokens per document chunk. Minimum is 128 tokens. - `maxBatchSize`: Maximum number of chunks per request. Minimum is 1 chunk.