Skip to content

Commit

Permalink
chore: release v0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sigoden committed Mar 13, 2023
1 parent ad04f60 commit 4a74f5c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "aichat"
version = "0.6.0"
version = "0.7.0"
edition = "2021"
authors = ["sigoden <[email protected]>"]
description = "A powerful chatgpt cli."
Expand Down
35 changes: 22 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ Download it from [Github Releases](https://github.com/sigoden/aichat/releases),
- syntax highlighting markdown and other 200 languages.
- Stream output with hand typing effect
- Multiline input support and emacs-like editing experience
- Proxy support
- Support proxy
- Support dark/light theme
- Save chat messages

## Config
Expand All @@ -52,18 +53,21 @@ save: true # optional, If set true, aichat will save chat
highlight: true # optional, Set false to turn highlight
proxy: "socks5://127.0.0.1:1080" # optional, set proxy server. e.g. http://127.0.0.1:8080 or socks5://127.0.0.1:1080
conversation_first: false # optional, If set true, start a conversation immediately upon repl
light_theme: false # optional, If set true, use light theme
```
> You can specify the configuration directory through `$AICHAT_CONFIG_DIR`
> You can use `.info` to view the current configuration file path and roles file path.

> You can use `.info` to view the current configuration file path
> You can use [Enviroment Variables](https://github.com/sigoden/aichat/wiki/Environment-Variables) to customize certain configuration items.

### Roles

We can let ChatGPT play a certain role through `prompt` to make it better generate what we want.

We can predefine a batch of roles in `roles.yaml`.

> We can get the location of `roles.yaml` through the `.info` command.

For example, we define a role

```yaml
Expand All @@ -86,6 +90,8 @@ unzip -P PASSWORD app.zip -d /tmp/app
---
```
We have provided many [Role Examples](https://github.com/sigoden/aichat/wiki/Role-Examples).
## CLI
```
Expand All @@ -97,12 +103,13 @@ Arguments:
[TEXT]... Input text

Options:
-H, --no-highlight Disable syntax highlightiing
-S, --no-stream No stream output
--list-roles List all roles
-r, --role <ROLE> Select a role
-h, --help Print help
-V, --version Print version
-p, --prompt <PROMPT> Set a GPT prompt
-H, --no-highlight Disable syntax highlightiing
-S, --no-stream No stream output
--list-roles List all roles
-r, --role <ROLE> Select a role
-h, --help Print help
-V, --version Print version
```
### Command mode
Expand Down Expand Up @@ -147,7 +154,7 @@ The Chat REPL supports:

### multi-line editing mode

**Type `{` or `(` or `[` at the beginning of the line to enter the multi-line editing mode.** In this mode you can type or paste multiple lines of text. Type the corresponding `}` or `)` or `]` at the end of the line to exit the mode and submit the content.
**Type `{` or `(` at the beginning of the line to enter the multi-line editing mode.** In this mode you can type or paste multiple lines of text. Type the corresponding `}` or `)` at the end of the line to exit the mode and submit the content.

```
〉{ convert json below to toml
Expand Down Expand Up @@ -177,7 +184,8 @@ The Chat REPL supports:
.help Print this help message
.exit Exit the REPL
Press Ctrl+C to abort conversation, Ctrl+D to exit the REPL
Type `{` to enter the multi-line editing mode, type '}' to exit the mode.
Press Ctrl+C to abort readline, Ctrl+D to exit the REPL
```

Expand All @@ -188,13 +196,13 @@ Press Ctrl+C to abort conversation, Ctrl+D to exit the REPL
config_file /home/alice/.config/aichat/config.yaml
roles_file /home/alice/.config/aichat/roles.yaml
messages_file /home/alice/.config/aichat/messages.md
role -
api_key sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
temperature -
save true
highlight true
proxy -
conversation_first false
light_theme false
dry_run false
```

Expand All @@ -214,7 +222,8 @@ When you set up a prompt, every message sent later will carry the prompt.
〉{ .prompt
I want you to translate the sentences I wrote into emojis.
I will write the sentence, and you will express it with emojis.
I don't want you to reply with anything but emoji.
I just want you to express it with emojis.
I want you to reply only with emojis.
}
Done
Expand Down

0 comments on commit 4a74f5c

Please sign in to comment.