chatgpt-cli icon indicating copy to clipboard operation
chatgpt-cli copied to clipboard

Auto-create new thread per conversation like in ChatGPT

Open oluckyman opened this issue 1 year ago • 4 comments

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).

oluckyman avatar May 29 '24 09:05 oluckyman

Happy to help out on this one @kardolus

catskull avatar May 29 '24 18:05 catskull

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 (?).

kardolus avatar Jun 02 '24 13:06 kardolus

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

oluckyman avatar Jun 02 '24 14:06 oluckyman

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 avatar Jun 02 '24 16:06 kardolus

@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?

kardolus avatar Aug 16 '24 14:08 kardolus