diff options
| author | sigoden <sigoden@gmail.com> | 2023-03-05 11:11:15 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-05 11:11:15 +0800 |
| commit | 2ac0155fa357a656e11422cfe6ee07fcd357109a (patch) | |
| tree | 4feaac76437fb4ae8255fda30559e7708bc5ba16 /README.md | |
| parent | d876818df17ad7b25ebb38a678aa23c79b826e38 (diff) | |
| download | aichat-2ac0155fa357a656e11422cfe6ee07fcd357109a.tar.gz | |
feat: accept pipe (#17)
`cat data | aichat` works
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 47 |
1 files changed, 37 insertions, 10 deletions
@@ -5,7 +5,7 @@ Chat with ChatGPT-3.5 in the terminal. - + ## Install @@ -22,11 +22,9 @@ Download from [Github Releases](https://github.com/sigoden/aichat/releases), unz ## Features - Compared to the browser, the terminal starts faster and needs less resources. -- Interactive chat and imperative query. -- Support highlight. -- Predefine prompts for role playing. -- History query/completion. -- Persist chat messages. +- Highlight chat message and stream. +- Define roles and let AI play them. +- Save chat messages. - Support proxy. - Written in rust, single executable file, cross-platform. @@ -81,16 +79,45 @@ We can predefine a batch of roles in `roles.yaml`. For example, we define a emoj Let ChatGPT answer questions in the role of a emoji translator ``` -$ aichat --role emoji I am very angry +〉.role emoji + +〉I am very angry 😠💢👿 ``` -In interactive chat, we do this: +## CLI ``` -〉.role emoji +Chat with OpenAI GPT-3.5 in the terminal. -〉I am very angry +Usage: aichat [OPTIONS] [TEXT]... + +Arguments: + [TEXT]... Input text, if no input text, enter interactive mode + +Options: + -L, --list-roles List all roles + -r, --role <ROLE> Specify the role that the AI will play + -h, --help Print help + -V, --version Print version +``` + +Interactive chat if no text input: +``` +$ aichat +Welcome to aichat x.x.x +Type ".help" for more information. +〉 +``` + +Imperative request data: +``` +aichat --role emoji I am very angry +``` + +Accept pipe: +``` +cat text | aichat ``` ## License |
