Commit Graph

542 Commits

Author SHA1 Message Date
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
2023-11-02 09:53:54 +08:00
sigoden
5c7bfd92ff
refactor: set tokens count factors (#195) 2023-11-02 07:08:54 +08:00
sigoden
0238c8734e chore: spellcheck typos 2023-11-01 22:48:49 +08:00
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
2023-11-01 22:15:55 +08:00
sigoden
da3c541b68 refactor: add/use openai_compatible_client macro 2023-11-01 15:02:30 +08:00
sigoden
8d76fc77fb refactor: use reqwest-eventsource as sse client 2023-11-01 13:24:50 +08:00
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
2023-11-01 10:28:54 +08:00
sigoden
64202758ec
chore: move split_line_* from repl/cmd.rs to utils/ (#190) 2023-10-31 18:34:38 +08:00
sigoden
bd3fc8e657 chore: refactor config description 2023-10-31 17:34:16 +08:00
sigoden
a137483b03
feat: improve client (#189) 2023-10-31 16:50:08 +08:00
sigoden
9b614600c6
fix: uncorrected render in command mode (#188) 2023-10-31 10:26:44 +08:00
sigoden
680670e834
feat: support custom theme (#187) 2023-10-31 09:06:41 +08:00
sigoden
84004fd576
feat: support OPENAI_API_BASE (#186) 2023-10-31 06:56:00 +08:00
sigoden
36380475d5
feat: support azure-openai (#166) 2023-10-31 06:36:52 +08:00
sigoden
86fd9d207e
fix: no last newline in reply text on windows os (#185) 2023-10-31 06:14:39 +08:00
sigoden
eb023e5759 chore: rename config.yaml to config.example.yaml 2023-10-30 19:57:45 +08:00
sigoden
54cfac427d chore: add demo config.yaml 2023-10-30 19:52:51 +08:00
sigoden
d2e06bf716 chore: update readme 2023-10-30 19:30:28 +08:00
sigoden
e86ad7dc16
feat: add .info role and .info session (#183) 2023-10-30 19:26:06 +08:00
sigoden
42339fac42 chore: add issue templates 2023-10-30 17:53:07 +08:00
sigoden
4909a20f2e
feat: force nowrap if no tty/terminal (#182) 2023-10-30 17:28:10 +08:00
sigoden
2203163938 chore: update readme and cli help 2023-10-30 17:10:52 +08:00
sigoden
5c0383f908
fix: dry run on role or session (#181) 2023-10-30 16:32:11 +08:00
sigoden
2168610dbd chore: spellcheck 2023-10-30 15:08:49 +08:00
sigoden
23e9fb5bbf
feat: deprecate .clear command (#180) 2023-10-30 14:17:15 +08:00
sigoden
ba3cc4f15d
feat: deprecate history file (#179) 2023-10-30 13:36:08 +08:00
sigoden
2f9121e515
fix: bugs between sesison/role (#178) 2023-10-30 12:58:11 +08:00
sigoden
f2c9f00bda
fix: detect light theme only by env var (#177) 2023-10-30 11:45:07 +08:00
sigoden
b3e6879438
feat: deprecate prompt, remove --prompt and .prompt (#176) 2023-10-30 10:36:08 +08:00
sigoden
44ea384ee5 chore: remove unnecessary clippy macros 2023-10-30 10:22:00 +08:00
Ajay Gonepuri (GONAPCORP)
49595053f0
chore: fix typo (#170) 2023-10-30 10:19:15 +08:00
sigoden
651516d49a
feat: show role info with --role <name> --info (#175) 2023-10-30 10:16:23 +08:00
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
2023-10-30 10:07:01 +08:00
sigoden
632a6fcc0b
feat: add --light-theme option (#169) 2023-10-29 17:36:17 +08:00
sigoden
1ced15a209
feat: autodetect light theme on unix-like os (#168) 2023-10-29 17:22:23 +08:00
sigoden
10b1d4b4de
fix: unexpcted duplicate lines in kitty (#167) 2023-10-29 12:52:04 +08:00
sigoden
33a9aacf39 chore: update readme 2023-10-29 10:48:19 +08:00
sigoden
4fae3724be chore: update readme 2023-10-29 10:44:30 +08:00
sigoden
985f8c0946 chore: improve client-related code quality 2023-10-29 10:09:33 +08:00
sigoden
557bed1459 chore: update Cargo.toml 2023-10-29 08:13:46 +08:00
sigoden
871adab22a chore: improve code quanity 2023-10-29 07:01:13 +08:00
sigoden
7f5bad6474 chore: improve code and doc 2023-10-28 22:22:37 +08:00
sigoden
2ab2e23bb0
refactor: improve environment variables (#163)
Rename `AICHAT_API_KEY` to `OPENAI_API_KEY`
Add `LOCALAI_API_KEY`
2023-10-28 22:10:17 +08:00
sigoden
bc44026ff8
feat: enhance session/conversation (#162)
* feat: enhance session/conversation

* updates

* updates

* cut version v0.9.0-rc2

* add .session name completion
2023-10-28 21:39:17 +08:00
sigoden
1575d44172
fix: .copy don't works on some linux distro (#161) 2023-10-27 23:45:26 +08:00
Gaurav Kumar
7298dbc165
chore: update README.md to fix typo (#159) 2023-10-27 22:00:28 +08:00
sigoden
aa43612d91
feat: change config.vi_keybindings to config.keybindings (#158) 2023-10-27 21:22:24 +08:00
sigoden
5ce2b9cd8f chore: update readme 2023-10-27 19:01:22 +08:00
sigoden
e07f6797e3 chore: update readme 2023-10-27 18:53:37 +08:00
sigoden
dbbbbfd5d6 chore: update readme and comments 2023-10-27 18:44:27 +08:00