diff --git a/core/config/yaml/models.ts b/core/config/yaml/models.ts index 0557cad78..f9d84fcd9 100644 --- a/core/config/yaml/models.ts +++ b/core/config/yaml/models.ts @@ -63,7 +63,7 @@ async function modelConfigToBaseLLM({ logger: llmLogger, uniqueId, title: model.name, - template: model.promptTemplates?.chat, + template: model.promptTemplates?.chatTemplate, promptTemplates: model.promptTemplates, baseChatSystemMessage: model.chatOptions?.baseSystemMessage, capabilities: { diff --git a/docs/docs/reference.md b/docs/docs/reference.md index b28b8a75d..62c87380f 100644 --- a/docs/docs/reference.md +++ b/docs/docs/reference.md @@ -167,7 +167,7 @@ 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 `chat`, [`edit`](./customize/model-roles/edit.mdx#prompt-templating) and [`apply`](./customize/model-roles/apply.mdx#prompt-templating). The `chat` property must be a valid template name, such as `llama3` or `anthropic`. +- `promptTemplates`: Can be used to override the default prompt templates for different model roles. Valid values are `chatTemplate`, [`edit`](./customize/model-roles/edit.mdx#prompt-templating) and [`apply`](./customize/model-roles/apply.mdx#prompt-templating). The `chatTemplate` property must be a valid template name, such as `llama3` or `anthropic`. - `chatOptions`: If the model includes role `chat`, these settings apply for Chat and Agent mode: - `baseSystemMessage`: Can be used to override the default system prompt. - `embedOptions`: If the model includes role `embed`, these settings apply for embeddings: diff --git a/packages/config-yaml/src/schemas/models.ts b/packages/config-yaml/src/schemas/models.ts index 692660a2b..a3e42d2c7 100644 --- a/packages/config-yaml/src/schemas/models.ts +++ b/packages/config-yaml/src/schemas/models.ts @@ -84,7 +84,7 @@ const templateSchema = z.enum([ /** Prompt templates use Handlebars syntax */ const promptTemplatesSchema = z.object({ apply: z.string().optional(), - chat: templateSchema.optional(), + chatTemplate: templateSchema.optional(), edit: z.string().optional(), }); export type PromptTemplates = z.infer;