summaryrefslogtreecommitdiffstats
path: root/src/utils/mod.rs
AgeCommit message (Collapse)AuthorLines
2024-10-22refactor: several improvements (#943)sigoden-0/+8
- rename agents_config_dir to agents_data_dir - do not save empty role name while saving the session - rename delete keys (roles/sessions/rags/agents => role/session/rag/agent-data) - improve some printing messages
2024-10-08refactor: NO_COLOR, highlight and render_error (#915)sigoden-2/+19
- If NO_COLOR is enabled, AIChat will not output any ANSI color codes. - `config.highlight` will only affect rendering markdown - improve rendering error
2024-10-02feat: change prompt for choosing shell command actions (#898)sigoden-5/+6
2024-09-10refactor: extract built-in roles to embedded files (#853)sigoden-0/+2
2024-09-06feat: better html to markdown converter (#840)sigoden-0/+2
2024-08-12feat: support builtin website crawling (recursive_url) (#786)sigoden-0/+11
2024-07-30feat: export agent variable as `LLM_AGENT_VAR_*` (#766)sigoden-0/+4
2024-07-30refactor: several improvements (#765)sigoden-2/+1
2024-07-28feat: ask for confirmation when some rag documents fail to load (#760)sigoden-0/+4
2024-07-28feat: add `config.stream` and `.set stream` repl command (#759)sigoden-1/+1
2024-07-17refactor: config creation prompt aware of env var (#722)sigoden-5/+1
2024-07-11refactor: improve estimate_token_length (#703)sigoden-20/+12
2024-07-10feat: adjust the way of obtaining function call results (#695)sigoden-10/+3
2024-07-10feat: `--file/.file` can load dirs (#693)sigoden-30/+3
2024-06-29refactor: the name of temp file (#670)sigoden-2/+10
2024-06-28feat: `.file`/`--file` support URLs (#665)sigoden-0/+2
2024-06-27feat: implement native rag url loader (#660)sigoden-0/+23
2024-06-27refactor: agent rag use `documents` field other than `embeddings` dir (#658)sigoden-1/+52
2024-06-26feat: rag load websites (#655)sigoden-1/+1
2024-06-11feat: add config `dangerously_functions` (#582)sigoden-8/+0
2024-06-06refactor: global IS_STDOUT_TERMINAL (#571)sigoden-0/+2
2024-06-05feat: support RAG (#560)sigoden-1/+1
* feat: support RAG * support more embeddings models and implement concurrent embedding api * show the progress of addings paths * ignore embedding context when saving message * embedding model max_chunk_size => default_chunk_size * support pdf and pandoc formats (docx, epub, ipynb)
2024-05-21refactor: change prompt for executing tool functions (#529)sigoden-0/+8
* refactor: change prompt for executing tool functions * add AICHAT_FUNCTION_AUTO_EXECUTE to auto confirm
2024-05-18feat: support function calling (#514)sigoden-62/+28
* feat: support function calling * fix on Windows OS * implement multi-steps function calling * fix on Windows OS * add error for client not support function calling * refactor message data structure and make claude client supporting function calling * support reuse previous call results * improve error handling for function calling * use prefix `may_` as indicator for `execute` type fucntions
2024-05-15refactor: improve tokenziesigoden-1/+2
2024-05-14feat: remove tiktoken (#506)sigoden-37/+21
2024-04-30refactor: improve code qualitysigoden-8/+2
2024-04-29feat: `.model` repl completions show max tokens and price (#462)sigoden-0/+34
2024-04-23refactor: more async code (#427)sigoden-9/+1
2024-04-21refactor: tell user session compression (#426)sigoden-1/+1
2024-04-21refactor: shell execution with spinner and select prompt (#425)sigoden-0/+2
2024-03-03feat: allow overriding execute/code role (#331)sigoden-2/+6
2024-03-02feat: add `-c/--code` to generate only code (#327)sigoden-0/+18
2024-03-02refactor: enhanced shell support (#326)sigoden-18/+35
2024-02-23feat: support `-e/--execute` to execute shell command (#318)sigoden-0/+46
2023-12-24feat: custom REPL prompt (#283)sigoden-0/+2
2023-12-19feat: support gemini (#273)sigoden-0/+5
2023-11-27feat: support vision (#249)sigoden-0/+9
* 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-08refactor: improve render (#235)sigoden-2/+0
* 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-07fix: unable to build on android using termux (#222)sigoden-0/+2
2023-11-03fix: wrap and tokenize algorithm (#205)sigoden-2/+28
* fix: wrap and tokenize algorithm * update tests * remove unnecessary tokenize from tiktoken
2023-11-02refactor: improve code quanity (#197)sigoden-0/+2
- move model_info.rs/message.rs to clients/ - rename SharedConfig to GlobalConfig
2023-11-02refactor: improve code quanity (#196)sigoden-17/+2
- rewrite Repl, remove ReplHandler - move ReplyStreamHandler to repl/ and rename it to ReplyHandler - deprecate utils::print_now - refactor session info
2023-11-01refactor: clients/* and config.rs (#193)sigoden-0/+10
- 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-10-31chore: move split_line_* from repl/cmd.rs to utils/ (#190)sigoden-0/+2
2023-10-30fix: dry run on role or session (#181)sigoden-11/+11
2023-10-30fix: detect light theme only by env var (#177)sigoden-2/+18
2023-10-29feat: autodetect light theme on unix-like os (#168)sigoden-0/+2
2023-10-27fix: .copy don't works on some linux distro (#161)sigoden-6/+0
2023-10-27refactor: streaming input text in dry-run mode (#154)sigoden-0/+8