kardolus / chatgpt-cli

ChatGPT CLI is a versatile tool for interacting with LLM models through OpenAI and Azure, as well as models from Perplexity AI and Llama. It supports prompts and history tracking for seamless, context-aware interactions. With extensive configuration options, it’s designed for both users and developers to create a customized GPT experience.
MIT License
567 stars 39 forks source link

Auto-create new thread per conversation like in ChatGPT #49

Closed oluckyman closed 3 months ago

oluckyman commented 5 months ago

It would be nice to have a mode similar to ChatGPT that, by default, starts the interactive mode in a new thread rather than in the default one. This way, I can quickly create random conversations with a few questions. Currently, I don't see how to quickly start a conversation in a new thread (and I don't yet know if it's a throwaway thread or one I might want to return to).

catskull commented 5 months ago

Happy to help out on this one @kardolus

kardolus commented 5 months ago

Thanks @catskull! Sorry y'all, was busy working on 1.6.1.

@oluckyman this seems like a good idea. Is there a specific naming convention you have in mind? I could try naming the thread based on the first query (?).

oluckyman commented 5 months ago

How about using a short, two-word slug? This could be either randomly generated or based on the thread content.

kardolus commented 5 months ago

A two-world slug sounds good, I will start with randomly created ones since it is easier to implement. We can always iterate later. Will probably make it configurable with a simple variable so users can opt in for this new functionality.

kardolus commented 3 months ago

@oluckyman I finally have time and energy again :). Just implemented this! --> https://github.com/kardolus/chatgpt-cli/commit/e9756499a4c5c276077228b750da56285b04d173

I will cut a release this weekend. Sorry to keep you waiting for so long.

Note that you will have to enable it by setting auto_create_new_thread to true in your config file.

Example output:

 2024-08-16 10:18:30 ⌚ (☸️ |kind:N/A) Guillermos-MacBook-Pro in ~/workspace/chatgpt-cli
± |main ↑1 {1} ✓| → ./bin/chatgpt --interactive
Entering interactive mode. Using thread 'int_28ee'. Type 'exit' and press Enter or press Ctrl+C to quit.

[2024-08-16 10:18:34] [Q1] ok
How can I help you today?