karthink / gptel

A simple LLM client for Emacs
GNU General Public License v3.0
1.04k stars 113 forks source link

[Idea] ChatGPT conversation as a graph #113

Closed zikajk closed 8 months ago

zikajk commented 8 months ago

Hello,

I frequently engage in extended discussions with ChatGPT, often diving deep into specific details. However, I've found that these in-depth conversations can become lengthy and hard to navigate. And creating a new conversation thread will lose context so I don't do that.

Here's an idea I've been considering: Would it be possible to use Emacs, in conjunction with your package, to create a more organized interaction with ChatGPT? My thought is to have a main conversation buffer and then branch out to topic-specific buffers when seeking detailed information. This would allow for a modular discussion, making it easier to navigate between the main topic and its subtopics.

For instance, if I ask ChatGPT about the "10 largest lakes in Europe", it would provide a list. I could then mark "Lake Ladoga", use a function like (give-me-details), and a new buffer focused on "Lake Ladoga" would open where I can continue with the conversation on this topic. Within this buffer, the conversation about this specific lake would ensue. Ideally, there should be some built-in logic: upon using main buffer again, a prompt like "thanks for the details, let's return to the discussion on the 10 largest lakes" would be sent to ChatGPT, and vice versa. Visually, this could resemble a ROAM-style map, with "10-largest-lake" as the main node and "Lake Ladoga Topic" as a connected sub-node.

Do you think this approach is feasible with the gptel package? I believe it could enhance the user experience when having detailed conversations with ChatGPT.

Edit: (give-me-details) might offer a list of choices as customizable prompts.

karthink commented 8 months ago

You can already do some of this with gptel-set-topic, which limits context by Org heading. You can write some glue code that creates an Org link from selected text to a new heading with that heading.

zikajk commented 8 months ago

Great to hear that! I'll give it a try.