sigoden / aichat

All-in-one LLM CLI tool featuring Shell Assistant, Chat-REPL, RAG, AI tools & agents, with access to OpenAI, Claude, Gemini, Ollama, Groq, and more.
Apache License 2.0
4.36k stars 297 forks source link

-s in CLI does not consistently capture session for agents #986

Closed eighteyes closed 1 day ago

eighteyes commented 1 day ago

Reproduction

  1. aichat -s -a agentname
  2. > <enter prompt>
  3. .info session

Expectation: Session contains past message and response, verbatim, unless compress threshold is crossed.

Reality: Session occasionally retains past conversations, one out of four messages or so.

Fix: Do not use -s flag, instead use .session in repl

Hope this helps diagnose and fix. If I knew Rust I'd give it a shot!

ty for aichat - best llm interface ever

.info ( trunc )
max_output_tokens       8192 (current model)
temperature             -
top_p                   -
dry_run                 false
stream                  true
save                    false
keybindings             emacs
wrap                    no
wrap_code               false
function_calling        true
use_tools               -
agent_prelude           -
save_session            -
compress_threshold      25000
rag_reranker_model      -
rag_top_k               3

Environment (please complete the following information):

Additional context

sigoden commented 1 day ago

If you use -s, it creates a temp session that will never be saved.

Please run it with -s <session-name> (specify a meaningful name) and --save-session (to save the current conversation to the session).

eighteyes commented 1 day ago

Maybe I just don't get it, is session supposed to be incomplete, or is it supposed to store the conversation history?

sigoden commented 1 day ago

@eighteyes

aichat -s begins a temp session, which is always new and empty.