aichat/src
sigoden 9c04455e36
feat: support role args (#69)
* 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-13 10:09:01 +08:00
..
config feat: support role args (#69) 2023-03-13 10:09:01 +08:00
render feat: add support for NO_COLOR (#67) 2023-03-11 21:45:34 +08:00
repl feat: support role args (#69) 2023-03-13 10:09:01 +08:00
utils feat: add remain tokens indicator and max tokens guard (#50) 2023-03-09 15:30:39 +08:00
cli.rs feat: add support for NO_COLOR (#67) 2023-03-11 21:45:34 +08:00
client.rs feat: support HTTPS_PROXY and ALL_PROXY (#68) 2023-03-12 08:31:06 +08:00
main.rs feat: add support for NO_COLOR (#67) 2023-03-11 21:45:34 +08:00
term.rs refactor: imports order and group 2023-03-09 08:15:14 +08:00