karthink / gptel

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

Feature request: Show current system prompt in the title line #274

Closed jwiegley closed 3 months ago

jwiegley commented 3 months ago

Next to where it presently shows the [Send: ...] and [<model>] buttons, I'd love for there to be a button for the current system prompt. When clicked it allows you to change the prompt for future submissions. But it also would let me know whether I need to change the system prompt for my next query or not. Thanks for such an awesome interface! I love being able to talk to both ChatGPT and Claude in a unified environment.

karthink commented 3 months ago

Holy crap it's @jwiegley 😮

I'm glad you're finding the package useful!

The header-line has not seen any updates in almost an year -- it's still the same code that I threw together hastily at the beginning of the project, so I plan to work on it soon.

That said, system prompts are often several paragraphs long. Would you find it useful to show just the first few words (as much as will fit) there? I also plan to provide better options for limiting or expanding the conversation context (by including other buffers/files, and supporting branching conversations in Org mode), so the [Send: ...] part will need a little more room on the header too, further reducing the space available for the system prompt.

jwiegley commented 3 months ago

Actually, all I want for the system prompt is the "key" I used to define it in the alist, not the prompt itself. That way, I know whether the text I submit is going to be translated into English, or into Spanish, for example. :)

karthink commented 3 months ago

Actually, all I want for the system prompt is the "key" I used to define it in the alist, not the prompt itself.

Done. If the system prompt has been edited (so it does not correspond to a "key"), it shows a very truncated version of the string instead.

For now I've removed the context indicator ([Send: ...]) to make room for this. It needs to be reworked to indicate branching/lineage context anyway.

jwiegley commented 3 months ago

Thank you so much, @karthink, I certainly wasn't expecting such a fast response! I use your tool almost daily now. Early I was using chatgpt-shell — which is also good — but I needed something that would work with multiple engines. Next I'm going to configure it to work with Ollama...