Commit Graph

334 Commits

Author SHA1 Message Date
sigoden
3b5843fe2e
refactor: all clients use openai token counter (#402) 2024-04-11 05:03:58 +08:00
sigoden
01ebc87348
refactor: update openai models list (#400) 2024-04-10 21:02:26 +08:00
sigoden
4a5ee3ecb7
feat: -f/--file take one value and no enter REPL (#399) 2024-04-10 20:36:12 +08:00
sigoden
a0bd6e1d5d
refactor: extract json stream handling (#398) 2024-04-10 20:06:57 +08:00
sigoden
5915bc2f3a
feat: support cohere (#397) 2024-04-10 18:52:21 +08:00
sigoden
ce1f9929f2
refactor: update openai models list (#396) 2024-04-10 09:27:39 +08:00
sigoden
07605d892a
refactor: update gemini/vertexai models list (#395) 2024-04-10 07:44:36 +08:00
sigoden
26289616d3
feat: use ctrl+enter to enter newline in REPL (#394) 2024-04-09 17:35:56 +08:00
sigoden
2280010959 refactor: change ctrlc message text 2024-04-08 23:27:37 +00:00
sigoden
2738988fc4
feat: add ctrlc_exit option to control REPL exit by ctrl+c (#391) 2024-04-09 07:17:02 +08:00
sigoden
664ac813aa
refactor: include filepaths if attaching multple text files (#389) 2024-04-07 06:26:43 +08:00
sigoden
e28b53a405
refactor: update models (#388) 2024-04-06 09:10:42 +08:00
sigoden
2654542601 chore: fix typo 2024-04-04 09:05:40 +00:00
sigoden
b91d1c4a93
refactor: gemini/vertexai blocked by safety (#386) 2024-04-04 16:43:05 +08:00
sigoden
2206593612
fix: incorrectly render text contains tabs (#384) 2024-03-28 22:11:56 +08:00
sigoden
68a1d98a3d
feat: add repl command .save session (#382) 2024-03-27 11:20:00 +08:00
sigoden
4cfd6c8e9f
refactor: config add in_repl property (#381) 2024-03-27 10:25:42 +08:00
sigoden
bd9a6a8725
feat: save_session config item can be null (#380) 2024-03-27 10:02:09 +08:00
sigoden
a05c462531
fix: not dirty session when updating properties (#379) 2024-03-27 08:23:24 +08:00
sigoden
3180d1d485
refactor: seperate temperature from role/session (#378) 2024-03-27 08:11:00 +08:00
sigoden
8da9fa5f4c
feat: add sepereate save_session config item to session (#377) 2024-03-27 07:33:21 +08:00
Patrick Jackson
582f56e915
feat: add save_session config item and --save-session cli option (#370)
* fix: sessions should save when exiting

* feat: improve save sessions

* feat: do not allow saving the temp session name

* feat: allow creating a session without interactive use

* feat: add `save_session` config and `--save-session` option

---------

Co-authored-by: sigoden <sigoden@gmail.com>
2024-03-27 07:00:28 +08:00
sigoden
7f05dc1a4a
feat: support customizing gemini safeSettings (#375) 2024-03-25 21:06:35 +08:00
sigoden
0ebc7955da
refactor: improve creating config for openai-compatible client (#374) 2024-03-25 11:13:54 +08:00
sigoden
eec041c111
feat: rename client localai to openai-compatible (#373)
BREAKING CHANGE: rename client localai to openai-compatible
2024-03-25 10:52:05 +08:00
sigoden
bbd0c28726
refactor: reorder models (#372)
The capable ones come first.
2024-03-25 09:21:46 +08:00
sigoden
774d991144
feat: support moonshot (#369) 2024-03-25 08:23:54 +08:00
sigoden
527da63d18
refactor: do not automatically convert temperature value (#368) 2024-03-22 19:24:22 +08:00
sigoden
4d52479545
fix: vertexai model names (#365) 2024-03-19 16:06:53 +08:00
sigoden
7279e43141
fix: color on non-truecolor terminal (#363)
* fix: color on non-truecolor terminal

* make ansicolor lower contrast
2024-03-19 11:27:20 +08:00
Chief Marlin
8681895944
fix: misspelled mistral model name (#359) 2024-03-19 08:34:39 +08:00
sigoden
50c03e4fdc
feat: update ernie models (#357) 2024-03-17 09:20:16 +08:00
sigoden
f3210d622a
refactor: remove role field from session struct (#356) 2024-03-17 08:23:47 +08:00
sigoden
992d570041
refactor: cleanup the deprecated repl commands (#355) 2024-03-17 07:29:19 +08:00
sigoden
930d8c12ab
feat: new model claude:claude-3-haiku-20240307 (#353) 2024-03-15 08:14:10 +08:00
sigoden
aed243c3aa
feat: allow use of temporary role in a session (#348) 2024-03-10 08:01:54 +08:00
sigoden
8f14498969
fix: erratic behaviour when using temp role in a session (#347) 2024-03-09 22:28:36 +08:00
sigoden
2404a619e4 chore: update deps 2024-03-07 15:14:52 +00:00
sigoden
d5b10ea0c1 chore: fix typos 2024-03-07 12:31:06 +00:00
sigoden
f82f577b6d
feat: add nushell integration (#344) 2024-03-07 06:31:23 +08:00
sigoden
46cb320aa5 chore: spell check 2024-03-06 01:46:47 +00:00
sigoden
20c78d6f15
feat: add new ernie models (#340) 2024-03-06 09:09:40 +08:00
sigoden
8e5d4e55b1
refactor: rename model's max_tokens to max_input_tokens (#339)
BREAKING CHANGE: rename model's `max_tokens` to `max_input_tokens`
2024-03-06 08:35:40 +08:00
sigoden
be4e5e569a
feat: support claude-3 (#336) 2024-03-05 06:52:47 +08:00
sigoden
3f693ea060
feat: compress session automaticlly (#333)
* feat: compress session automaticlly

* non-block

* update field description

* set compress_threshold

* update session::clear_messages

* able to override session compress_threshold

* enable compress_threshold by default

* make session compress_threshold optional
2024-03-04 11:08:59 +08:00
sigoden
9e15a3409e
feat: reduce gemini blocking of unsafe content with safetySettings (#334) 2024-03-04 10:51:30 +08:00
sigoden
e443905dc1
feat: add .clear messages to clear session messages (#332) 2024-03-03 15:25:21 +08:00
sigoden
7e32787dba chore: improve code quanity on ReplCommand/State 2024-03-03 06:53:59 +00:00
sigoden
8421f23b45
feat: allow overriding execute/code role (#331) 2024-03-03 09:57:50 +08:00
sigoden
b2f86f2899
refactor: auto_copy works when executing command (#328) 2024-03-02 22:02:29 +08:00
sigoden
3c16aff591
feat: add -c/--code to generate only code (#327) 2024-03-02 21:11:28 +08:00
sigoden
bc3cbce2f4
refactor: enhanced shell support (#326) 2024-03-02 15:44:08 +08:00
sigoden
bbb13d8227 chore: improve openai api error handling 2024-03-01 10:31:25 +00:00
sigoden
7633940e03 chore: update order of openai models 2024-03-01 09:58:19 +00:00
sigoden
75fe0b9205
feat: support mistral (#324) 2024-02-28 08:22:15 +08:00
sigoden
c538533014
feat: support claude (#278) 2024-02-27 08:38:19 +08:00
sigoden
c773e8d2e1
refactor: improve saving messages (#322) 2024-02-25 20:09:40 +08:00
sigoden
a3fbf71c1c chore: improve execute commands prompt 2024-02-25 00:16:16 +00:00
sigoden
21d1be5bed
refactor: improve prompt error handling (#319) 2024-02-24 19:13:48 +08:00
sigoden
16b7ac071f chore: update deps and readme 2024-02-23 08:07:56 +00:00
sigoden
7638412128
feat: support -e/--execute to execute shell command (#318) 2024-02-23 13:15:18 +08:00
sigoden
6c0204e696
refactor: change header of messages saved to markdown (#317) 2024-02-22 11:39:22 +08:00
sigoden
373b34ef5c
feat: edit current prompt on $VISUAL/$EDITOR (#314) 2024-02-20 21:31:42 +08:00
sigoden
179a5f5749
refactor: update vertexai/gemini/ernie clients (#309) 2024-02-16 18:32:33 +08:00
sigoden
5e4210980d
feat: support vertexai (#308) 2024-02-15 08:10:30 +08:00
sigoden
3bf0c371e4
feat: update openai/qianwen/gemini models (#306) 2024-02-13 13:07:23 +08:00
Joseph Goulden
25b27c148a
fix: do not attempt to deserialize zero byte chunks in ollama stream (#303) 2024-02-05 21:24:37 +08:00
Kelvie Wong
176ff6f83e
feat: add extra_fields to models of localai/ollama clients (#298)
* Add an "extra_fields" config to localai models

Because there are so many local AIs out there with a bunch of custom
parameters you can set, this allows users to send in extra parameters to
a local LLM runner, such as, e.g. `instruction_template: Alpaca`, so
that Mixtral can take a system prompt.

* support ollama

---------

Co-authored-by: sigoden <sigoden@gmail.com>
2024-01-30 19:43:55 +08:00
sigoden
a30c3cc4c1
feat: add openai.api_base config (#302) 2024-01-30 18:28:12 +08:00
sigoden
fe35cfd941
feat: supports model capabilities (#297)
1. automatically switch to the model that has the necessary capabilities.
2. throw an error if the client does not have a model with the necessary capabilities
2024-01-13 19:52:07 +08:00
Nicola Coretti
4e99df4c1b
fix: deprecation warning of .read command (#296) 2024-01-13 08:18:04 +08:00
sigoden
0e5c8567d4
refactor: ollam api_base configuration (#285) 2023-12-25 08:05:06 +08:00
sigoden
1c9ca1b002
feat: custom REPL prompt (#283) 2023-12-24 16:04:18 +08:00
sigoden
89fefb4d1a
refactor: remove path existence indicator from info (#282) 2023-12-23 06:35:23 +08:00
sigoden
6280f5ab4b
feat: qianwen vision models support embeded images (#277) 2023-12-20 11:29:52 +08:00
sigoden
64c4edf7c8
feat: support ollama (#276) 2023-12-20 07:49:05 +08:00
sigoden
6c9d7a679e
feat: support qianwen:qwen-vl-plus (#275) 2023-12-19 23:10:35 +08:00
sigoden
34d58b2369 refactor: adjust order of ernie models 2023-12-19 12:55:03 +00:00
sigoden
6fb13359f4
feat: abandon PaLM2 (#274) 2023-12-19 20:47:15 +08:00
sigoden
6286251d32
feat: support gemini (#273) 2023-12-19 20:37:53 +08:00
sigoden
3adfeb1ae7 chore: change order of openai models 2023-12-16 03:15:43 +00:00
sigoden
27cae9582f
fix: cannot read image with uppercase ext (#270) 2023-12-14 06:15:01 +08:00
sigoden
10e3b6d234
chore: update change session error message (#267) 2023-12-13 08:11:10 +08:00
sigoden
e7272398dd
feat: change REPL indicators (#263) 2023-12-08 07:03:42 +08:00
sigoden
ee5fbe629c
feat: allow shift-tab to select prev in completion menu (#254) 2023-11-27 19:08:33 +08:00
sigoden
c58912ba64
refactor: sort of some complete type (#253) 2023-11-27 17:22:16 +08:00
sigoden
18f16c6511
feat: add ernie:ernie-bot-8k qianwen:qwen-max (#252) 2023-11-27 16:06:35 +08:00
sigoden
2508d56598
feat: state-aware completer (#251) 2023-11-27 15:39:55 +08:00
sigoden
25e545474f
chore: upgrade deps (#250) 2023-11-27 14:20:02 +08:00
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
2023-11-27 14:04:50 +08:00
sigoden
5bfe95d311
refactor: trim trailing spaces from the role prompt (#246) 2023-11-14 11:58:56 +08:00
sigoden
8f1d8dec5f
refactor: palm client system message (#245) 2023-11-14 10:34:42 +08:00
sigoden
e118e864d5
refactor: ernie client system message (#244) 2023-11-14 10:03:01 +08:00
sigoden
9b0fbe3506
fix: the last reply tokens was not highlighted (#243) 2023-11-14 08:53:21 +08:00
sigoden
542dcfe6f6
feat: extend .read to support files and messages (#242) 2023-11-13 19:53:24 +08:00
sigoden
757c192829
refactor: qianwen client use incremental_output (#240) 2023-11-09 08:55:52 +08:00
sigoden
01cf8acb81
refactor: improve code quanity (#238) 2023-11-08 22:20:46 +08:00
sigoden
b40659613d
feat: add a spinner to indicate waiting for response (#236) 2023-11-08 20:36:30 +08:00
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
2023-11-08 18:26:38 +08:00
sigoden
c99dd5a2ff
feat: add openai:gpt-4-1106-preview (#233) 2023-11-08 11:39:27 +08:00