summaryrefslogtreecommitdiffstats
path: root/src/config/role.rs
AgeCommit message (Collapse)AuthorLines
2023-03-13feat: support role args (#69)sigoden-5/+42
* feat: support role args We can use role args to pass some additional arguments to the prompt. ``` - name: convert:json:yaml prompt: convert __ARG1__ below to __ARG2__ ``` `:json:yaml` is `role args`. It has two args: - arg1 `json`, it will replace __ARG1__ in prompt - arg2 `yaml`, it will replace __ARG2__ in prompt ``` 〉.role convert:json:yaml name: convert:json:yaml prompt: convert json below to yaml temperature: null 〉.role convert:yaml:json name: convert:yaml:json prompt: convert yaml below to json temperature: null ``` different role args, will generate different prompts. * small updates
2023-03-10feat: type `{` `[` `(` to enter multi-line editing mode (#58)sigoden-1/+1
Abandon `.editor` command, it's too complicated.
2023-03-09refactor: optimize counting tokens (#53)sigoden-22/+3
2023-03-09feat: support two types of role prompts (#52)sigoden-0/+89
1. embeded prompt use __INPUT__ placeholder will generate one user message when send to gpt ``` - name: shell prompt: > I want you to act as a linux shell expert. Q: How to unzip a file A: unzip file.zip Q: __INPUT__ A: ``` 2. system prompt no __INPUT__ placeholder will generate on system message and one user message when send to gpt ``` - name: shell prompt: | I want you to act as a linux shell expert. I want you to answer only with bash code. Do not write explanations. ```