Commit Graph

246 Commits (d5b10ea0c1aa80b391e99ff554adf15bc0501401)

Author SHA1 Message Date
sigoden 25e545474f
chore: upgrade deps (#250) 7 months ago
sigoden 35c75506e2
feat: support vision (#249)
* feat: support vision

* clippy

* implement vision

* resolve data url to local file

* add model openai:gpt-4-vision-preview

* use newline to concate embeded text files

* set max_tokens for gpt-4-vision-preview
7 months ago
sigoden 5bfe95d311
refactor: trim trailing spaces from the role prompt (#246) 8 months ago
sigoden 8f1d8dec5f
refactor: palm client system message (#245) 8 months ago
sigoden e118e864d5
refactor: ernie client system message (#244) 8 months ago
sigoden 9b0fbe3506
fix: the last reply tokens was not highlighted (#243) 8 months ago
sigoden 542dcfe6f6
feat: extend `.read` to support files and messages (#242) 8 months ago
sigoden 757c192829
refactor: qianwen client use incremental_output (#240) 8 months ago
sigoden 01cf8acb81
refactor: improve code quanity (#238) 8 months ago
sigoden b40659613d
feat: add a spinner to indicate waiting for response (#236) 8 months ago
sigoden eb30d90391
refactor: improve render (#235)
* refactor: redesign render

- if stdout is not terminal, just write reply text to stdout
- rename repl_render_stream to markdown_stream
- deprecate cmd_render_stream
- use raw_stream to just print streaming reply text

* optimize rendering error

* optimize render_stream
8 months ago
sigoden c99dd5a2ff
feat: add openai:gpt-4-1106-preview (#233) 8 months ago
sigoden 15efa17963
refactor: use ::: as multipline input indicator, deprecate """ (#232) 8 months ago
sigoden 819f50d9b1
fix: unexpected additional newline in REPL (#231) 8 months ago
sigoden e8461b8462
refactor: output info includes auto_copy and light_theme (#230) 8 months ago
sigoden c99bd015aa
feat: temporarily use a role to send a message (#227) 8 months ago
sigoden c256b6bae5
refactor: improve repl completer (#226) 8 months ago
sigoden b07a112f89
feat: deprecate `.edit`, use """ instead (#225) 8 months ago
sigoden 6bb2ec05be
feat: add `config.prelude` to allow setting default role/session (#224) 8 months ago
sigoden 534733b77c
fix: unable to build on android using termux (#222) 8 months ago
sigoden d40f104f66
feat: allow the use of an unlisted model (#219) 8 months ago
sigoden 9a8b302432
refactor: remove Model.client_index, match client by name (#218) 8 months ago
sigoden 87aec71e08
refactor: use &GlobalConfig to avoid clone (#217) 8 months ago
sigoden 81624f7267
refactor: rename Model.llm_name to name (#216) 8 months ago
sigoden 399ed3337f
refactor: improve error message for PaLM client (#213) 8 months ago
sigoden 7627771e2d
feat: support Qianwen (#211) 8 months ago
sigoden ec1f99fbf5
feat: support Ernie (#210) 8 months ago
sigoden bba5028615
feat: support PaLM (#209) 8 months ago
sigoden 4380b4f20b
refactor: rename azure to azure_openai, improve register_client! (#208) 8 months ago
sigoden 887bf0a744
fix: fix rendering markdown in REPL (#207) 8 months ago
sigoden 811e605fbf
fix: don't ignore '\n\n' reply at begin (#206) 8 months ago
sigoden c20cd20d53
fix: wrap and tokenize algorithm (#205)
* fix: wrap and tokenize algorithm

* update tests

* remove unnecessary tokenize from tiktoken
8 months ago
sigoden b34e40e25f
refactor: rename azure-openai to azure (#204) 8 months ago
sigoden f9c40e52da
refactor: improve code quanity (#203)
- update field name of ModelInfo
- rename ModelInfo to Model
8 months ago
sigoden dce6877f5d
refactor: optimize render (#202) 8 months ago
sigoden 16eba9baa1
fix: incorrect last line render in command mode (#201) 8 months ago
sigoden eff69a482d
feat: add `.set auto_copy` (#200) 8 months ago
sigoden 713c92bdde chore: add one newline when caught repl error 8 months ago
sigoden 652b51509d
refactor: improve repl completer (#199) 8 months ago
sigoden 7c6841782d
refactor: improve code quanity (#197)
- move model_info.rs/message.rs to clients/
- rename SharedConfig to GlobalConfig
8 months ago
sigoden 444f4ebe9d
refactor: improve code quanity (#196)
- rewrite Repl, remove ReplHandler
- move ReplyStreamHandler to repl/ and rename it to ReplyHandler
- deprecate utils::print_now
- refactor session info
8 months ago
sigoden 5c7bfd92ff
refactor: set tokens count factors (#195) 8 months ago
sigoden 0238c8734e chore: spellcheck typos 8 months ago
sigoden f6da06dad9
refactor: improve code quanity (#194)
- extends ModelInfo for tokens calculating
- refactor config/session.rs, improve export, render, getter/setter
- modify main.rs, allow --model override session.model
8 months ago
sigoden da3c541b68 refactor: add/use openai_compatible_client macro 8 months ago
sigoden 8d76fc77fb refactor: use reqwest-eventsource as sse client 8 months ago
sigoden 7f2210dbca
refactor: clients/* and config.rs (#193)
- add register_clients macro to make it easier to add a new client
- no create_client_config, just add const PROMPTS
- move ModelInfo from clients/ to config/
- model's max_tokens are optional
- improve code quanity on config/mod.rs
- add/use macro config_get_fn
8 months ago
sigoden 64202758ec
chore: move split_line_* from repl/cmd.rs to utils/ (#190) 8 months ago
sigoden bd3fc8e657 chore: refactor config description 8 months ago
sigoden a137483b03
feat: improve client (#189) 8 months ago
sigoden 9b614600c6
fix: uncorrected render in command mode (#188) 8 months ago
sigoden 680670e834
feat: support custom theme (#187) 8 months ago
sigoden 84004fd576
feat: support OPENAI_API_BASE (#186) 8 months ago
sigoden 36380475d5
feat: support azure-openai (#166) 8 months ago
sigoden 86fd9d207e
fix: no last newline in reply text on windows os (#185) 8 months ago
sigoden e86ad7dc16
feat: add `.info role` and `.info session` (#183) 8 months ago
sigoden 4909a20f2e
feat: force nowrap if no tty/terminal (#182) 8 months ago
sigoden 2203163938 chore: update readme and cli help 8 months ago
sigoden 5c0383f908
fix: dry run on role or session (#181) 8 months ago
sigoden 2168610dbd chore: spellcheck 8 months ago
sigoden 23e9fb5bbf
feat: deprecate .clear command (#180) 8 months ago
sigoden ba3cc4f15d
feat: deprecate history file (#179) 8 months ago
sigoden 2f9121e515
fix: bugs between sesison/role (#178) 8 months ago
sigoden f2c9f00bda
fix: detect light theme only by env var (#177) 8 months ago
sigoden b3e6879438
feat: deprecate prompt, remove `--prompt` and `.prompt` (#176) 8 months ago
sigoden 44ea384ee5 chore: remove unnecessary clippy macros 8 months ago
sigoden 651516d49a
feat: show role info with `--role <name> --info` (#175) 8 months ago
sigoden b276dfedd2
feat: support textwrap (#171)
* feat: support textwrap

* improve cmd_render_stream

* done cmd_render_stream

* add `-w` alias to `--wrap`

* done repl_render_stream

* add `config.wrap_code`

* remove cached config.wrap_width

* fix unxpected duplicate lines on kitty

* refactor markdown render

* improve render

* fix test
8 months ago
sigoden 632a6fcc0b
feat: add `--light-theme` option (#169) 8 months ago
sigoden 1ced15a209
feat: autodetect light theme on unix-like os (#168) 8 months ago
sigoden 10b1d4b4de
fix: unexpcted duplicate lines in kitty (#167) 8 months ago
sigoden 985f8c0946 chore: improve client-related code quality 8 months ago
sigoden 871adab22a chore: improve code quanity 8 months ago
sigoden 7f5bad6474 chore: improve code and doc 8 months ago
sigoden 2ab2e23bb0
refactor: improve environment variables (#163)
Rename `AICHAT_API_KEY` to `OPENAI_API_KEY`
Add `LOCALAI_API_KEY`
8 months ago
sigoden bc44026ff8
feat: enhance session/conversation (#162)
* feat: enhance session/conversation

* updates

* updates

* cut version v0.9.0-rc2

* add .session name completion
8 months ago
sigoden 1575d44172
fix: .copy don't works on some linux distro (#161) 8 months ago
sigoden aa43612d91
feat: change config.vi_keybindings to config.keybindings (#158) 8 months ago
sigoden dbbbbfd5d6 chore: update readme and comments 8 months ago
sigoden d43425e22b
chore: change left-prompt for conversation (#157) 8 months ago
sigoden 0179bef80d
chore: replace atty with is-terminal (#156) 8 months ago
sigoden 47818159a7
refactor: streaming input text in dry-run mode (#154) 8 months ago
sigoden 2fad63be6a
fix: parse command fails if command following newline (#153) 8 months ago
sigoden ca0f6343f2
feat: add .edit command for multi-line editing (#151) 8 months ago
sigoden b3f8f27018 refactor: improve code quanity 8 months ago
Leo Bergnéhr c3f9ef6c39
feat: add .read command (#145) 8 months ago
sigoden 66fd547c0f refactor: improve code quanity
remove tokio::runtime::Runtime from client
8 months ago
sigoden 7d8564cafb
feat: support multi bots and custom url (#150) 8 months ago
sigoden f4160ff85b
feat: suppport vi keybindings (#148) 8 months ago
sigoden b5e1460151
feat: use backslash at end of line for multiline text (#147)
BREAKING CHANGE: use backslash at end of line for multiline text

```
〉.set dry_run true

〉abc \
def \
ijk

>>> The following message consumes 12 tokens.
abc 
def 
ijk
```

Deprecate old {}/() multi-line editing
8 months ago
sigoden 90bdc1b7db chore: update deps 9 months ago
Jackson Goode 30daa40eb0
fix: grammar/wording corrections (#135) 12 months ago
Anthony Rubick 97fc7de675
fix: minor code cleanup and pedantic lints (#134) 12 months ago
sigoden ec51b84290
feat: add new model gpt-3.5-turbo-16k (#126) 1 year ago
sigoden 00ce157571
feat: add `.copy` command (#119) 1 year ago
shane s cf03952c7b
feat: add `config.auto_copy` (#102)
* added config option to copy all ChatGPT output to clipboard

* formatted with

* updates

---------

Co-authored-by: sigoden <sigoden@gmail.com>
1 year ago
sigoden 2489e34993
fix: config file with strict perms (#118) 1 year ago
sigoden 439d231e42 chore: trivial updates 1 year ago
sigoden 065a32decb
feat: support backeted paste (#117) 1 year ago
sigoden a7b31d4367 chore: fix typo 1 year ago