update corresponding docs
This commit is contained in:
parent
608ca07dfb
commit
b0e676b5dd
3 changed files with 24 additions and 1 deletions
|
|
@ -186,6 +186,8 @@ export class CompletionProvider {
|
|||
helper,
|
||||
});
|
||||
|
||||
console.log('debug1 the prompt was->', prompt)
|
||||
|
||||
// Completion
|
||||
let completion: string | undefined = "";
|
||||
|
||||
|
|
|
|||
|
|
@ -12,3 +12,24 @@ In Continue, autocomplete models are used to display inline [Autocomplete](../..
|
|||
## Recommended Autocomplete models
|
||||
|
||||
Visit the [Autocomplete Deep Dive](../deep-dives/autocomplete.mdx) for recommended models and more details.
|
||||
|
||||
## Prompt templating
|
||||
|
||||
You can customize the prompt template used when autocomplete happens by setting the `promptTemplates.autocomplete` property in your model configuration. Continue uses [Handlebars syntax](https://handlebarsjs.com/guide/) for templating.
|
||||
|
||||
Available variables for the apply template:
|
||||
|
||||
- `{{{prefix}}}` - the code before your cursor
|
||||
- `{{{suffix}}}` - the code after your cursor
|
||||
- `{{{filename}}}` - the name of the file your cursor currently is
|
||||
- `{{{reponame}}}` - the name of the folder where the codebase is
|
||||
- `{{{language}}}` - the name of the programming language in full (ex. Typescript)
|
||||
|
||||
Example:
|
||||
|
||||
```yaml
|
||||
models:
|
||||
- name: My Custom Autocomplete Template
|
||||
provider: ollama
|
||||
model: qwen2.5-coder:1.5b
|
||||
```
|
||||
|
|
@ -145,7 +145,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 [`edit`](./customize/model-roles/edit.mdx#prompt-templating) and [`apply`](./customize/model-roles/apply.mdx#prompt-templating).
|
||||
- `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 [autocomplete](./customize/model-roles/autocomplete.md#prompt-templating)
|
||||
- `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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue