llama-cli how to include input in log file
Posted by reddit-doc@reddit | LocalLLaMA | View on Reddit | 2 comments
Hi there, this might be a stupid question, but how can I include my interactive input in the log file when I use llama-cli directly? Output in the terminal:
== Running in interactive mode. ==
- Press Ctrl+C to interject at any time.
- Press Return to return control to the AI.
- To return control without starting a new line, end your input with '/'.
- If you want to submit another line, end your input with '\'.
- Not using system message. To change it, set a different value via -sys PROMPT
> Hello
Hello there! π
How can I help you today? Are you looking to:
* **Chat?** Just want to talk about your day?
* **Get information?** Ask me a question about anything!
* **Brainstorm ideas?** Need help with a project or a problem?
* **Write something?** I can help with stories, poems, emails, and more.
* **Something else?**
Just let me know what's on your mind. I'm ready to listen (or, well, read)! π
> What is the result of 1+2
The result of 1 + 2 is **3**.
Simple as that! π Is there anything else I can help you calculate?
>
Output in the log file (parameter --log-file):
== Running in interactive mode. ==
- Press Ctrl+C to interject at any time.
- Press Return to return control to the AI.
- To return control without starting a new line, end your input with '/'.
- If you want to submit another line, end your input with '\'.
- Not using system message. To change it, set a different value via -sys PROMPT
> Hello there! π
How can I help you today? Are you looking to:
* **Chat?** Just want to talk about your day?
* **Get information?** Ask me a question about anything!
* **Brainstorm ideas?** Need help with a project or a problem?
* **Write something?** I can help with stories, poems, emails, and more.
* **Something else?**
Just let me know what's on your mind. I'm ready to listen (or, well, read)! π
> The result of 1 + 2 is **3**.
Simple as that! π Is there anything else I can help you calculate?
>
As you can see all my input is missing here.
pluckytree@reddit
llama-cli still doesn't seem to have options to log all conversations (note: not debug info, which is does do) to log files. Even piping the output doesn't seem to work.
I haven't tried that previous suggestion of (using script) but another option for anyone that ends up here... I'm running llama-cli inside Visual Studio Code (actually, VSCodium) 90% of the time and I'm using an extension called "TermLog" to auto-save all terminal sessions to logs. This works nicely and provides some decent granular configuration so I can log based on which model I'm using, date, etc.
(Then I scoop the logs up for indexing / searching by other mechanisms in my workflows.)
aldegr@reddit
A workaround is to run llama-cli with
script(assuming youβre running Linux). This will produce a typescript file with the entire log, including your input.https://man7.org/linux/man-pages/man1/script.1.html