Commit Graph

109 Commits (4a74f5cd72160585721dbce1e92c110125d046dd)
 

Author SHA1 Message Date
sigoden 4a74f5cd72 chore: release v0.7.0 1 year ago
sigoden ad04f60365 chore: optimzie role args 1 year ago
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
1 year ago
sigoden 8fa2e2683b
feat: support HTTPS_PROXY and ALL_PROXY (#68) 1 year ago
sigoden 0ed0ad1fd2 chore: optimize readline multiline 1 year ago
sigoden 4aab872ee1
feat: add support for NO_COLOR (#67) 1 year ago
sigoden cfb6ce6958
feat: support light theme (#65)
There are two ways to enable the light theme:
- add `light_theme: true` to config.yaml
- use `AICHAT_LIGHT_THEME=true` env var
1 year ago
sigoden dc09cb38d4
feat: support more env vars (#63)
- AICHAT_CONFIG_DIR: sepecify the configuration directory
- AICHAT_ROLES_FILE: set the `roles.yaml` file path
- AICHAT_API_KEY: set the api key
1 year ago
sigoden d48cd64162
feat: provide `--prompt` for adding a prompt from cli (#62) 1 year ago
sigoden 52de7ec33a chore: fix some typos 1 year ago
sigoden cd10a636ad chore: update readme 1 year ago
sigoden f1e65def96 chore: release v0.6.0 1 year ago
sigoden cc626e73df chore: update `.help` output text 1 year ago
sigoden 1dc16e6709
feat: type `{` `[` `(` to enter multi-line editing mode (#58)
Abandon `.editor` command, it's too complicated.
1 year ago
sigoden 54e6edbf21 chore: recovery cursor in case of stream abort 1 year ago
sigoden 865fb49af9 chore: improve code quality, omit head 2 newlines in handler but in not client 1 year ago
sigoden 978d4c54c0 chore: opitmize code, move MAX_TOKENS related to config/message.rs 1 year ago
sigoden 899c4af9ea fix: forbid .clear role in middle of conversation 1 year ago
sigoden ff00426c2c chore: improve code quality, split rep/prompt.rs from repl/init.rs 1 year ago
sigoden 4161eaa6c3
fix: cli specify role is not applied when conversation_first set true (#57)
close #56
1 year ago
sigoden 0044399509
feat: add config.conversation_first (#55)
If set true, start a conversation immediately upon repl.
1 year ago
sigoden ad282ae74c refactor: no need to confirm conversation when token used out 1 year ago
sigoden 89eaf1b653 fix: csharp and php do not render correctly 1 year ago
sigoden 553d0fe55b
refactor: optimize counting tokens (#53) 1 year ago
sigoden 9767c07eee
feat: support two types of role prompts (#52)
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.
```
1 year ago
sigoden c45d71cdea refactor: trivial updates
- change prompt's temp role name
- questionnaire of 'save chat messages' default set true
- `.info` do not show role name
1 year ago
sigoden 05d20f207f
feat: add remain tokens indicator and max tokens guard (#50) 1 year ago
sigoden c7eb261abc
fix: abort by ctrlc unexpectedly prints error message (#49) 1 year ago
sigoden a62e461e38
feat: support conversation (#48) 1 year ago
sigoden a7f2da156c
feat: add role info to readline indicator (#47)
```
coder〉
```
1 year ago
sigoden e78b5f7c58 refactor: imports order and group 1 year ago
sigoden 1ec451da89
refactor: replace Arc<Refcell<Config>> with Arc<Mutex<Config>> (#46) 1 year ago
sigoden ebd3cb2401 chore: update readme 1 year ago
sigoden 00ba8b5108 refactor: extra spaces are allowed around repl command 1 year ago
sigoden ed905e3bd1 chore: fix cargo keyword 1 year ago
sigoden 7270308a24 chore: release v0.5.0 1 year ago
sigoden 9d32837669
chore: optimize newline again (#43)
* chore: optimize newline again

command mode: should no extra newline
chat mode: should have one newline

* fix windows newline

* fix macos newline
1 year ago
sigoden 56483e04f0
feat: add role-specific config (#42)
Now we can set role temperature. For example:

```
- 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.
  temperature: 0.4
```
1 year ago
sigoden 2539e24fe9
chore: improve code by getting prompt from config (#39) 1 year ago
sigoden ee81275431
fix: windows no stream output (#37) 1 year ago
sigoden 2a7a6f5f27 chore: no longer ignore any error 1 year ago
sigoden 4e729db237 chore: optimize output newline 1 year ago
sigoden f694a59dcc
refactor: replace dump with print_now! (#35) 1 year ago
sigoden b7cb6f89f1
fix: repl set save true not work if not rerun(#34) 1 year ago
sigoden b05fce7bca
refactor: split long paragraphs for smoother stream output (#33) 1 year ago
sigoden ec1c4bcf8f
refactor: theme and code color (#32) 1 year ago
sigoden 360264121c
feat: command mode supports stream out (#31)
* feat: command mode supports stream out

* update cli
1 year ago
sigoden c7fcdb1744
refactor: adjust repl (#30)
- abandon .copy
- rename .multiple => .editor
- if command successed, do not output `Done`
- if command failed, output `Error: <error message>`
1 year ago
sigoden d73be65b07
refactor: support highlighting more languages (#28) 1 year ago
sigoden 11dc4d104b
refactor: optimize ctrl+c/ctrl+d abort handling (#27) 1 year ago