auto-dev-vscode
auto-dev-vscode copied to clipboard
how to set prompt template for completion?
Before submitting your bug report
- [X] I'm not able to find an open issue that reports the same bug
- [X] I've seen the troubleshooting guide on the AutoDev Docs
Relevant environment info
- OS: win11
- AutoDev VSCode: v0.5.2
- IDE:
Description
To reproduce
No response
Log output
No response
Use custom template, follow these steps.
- Identify the model special tokens.
- Populate the template with variables like:
Code Llama expects a specific format for infilling code:
<PRE> {prefix} <SUF>{suffix} <MID>
<PRE>, <SUF> and <MID> are guide tokens;{prefix} and {suffix} are for extension.
-
These are the available variables in the template:
- file_name:Current file name
- language:Document’s programming language (e.g., Java, JavaScript)
- prefix: Content before the cursor
- suffix: Content after the cursor
Note: Formats differ by model; refer to the model introduction page or paper for specifics.
File: src/action/providers/AutoDevCodeInlineCompletionProvider.ts
Screenshot: