iansinnott / prompta

ChatGPT UI that is keyboard-centric, mobile friendly, and searchable.
https://chat.prompta.dev
MIT License
154 stars 13 forks source link

Editing previous prompts #14

Closed ouroborus closed 8 months ago

ouroborus commented 9 months ago

Let's have a way to edit previous prompts. In ChatGPT, you can edit previous prompts, essentially taking an earlier part of the conversation in a different direction. You can also navigate between these prompt versions. The effect creates a conversation tree.

iansinnott commented 9 months ago

Hey @ouroborus thanks for the feedback.

I agree it's a cool feature of ChatGPT but it's not the goal of this project to duplicate their functionality 1:1. This project aims to provide things ChatGPT is missing, such as quick search over past chats.

This would be a nice feature to have if someone else wants to take it on, but I have no plans to implement it myself.

struanb commented 8 months ago

This isn't a feature I need right now but, just to add, a key reason I edit prompts is when it becomes apparent a typo, missed word, or some missed context renders my previous input erroneous. I prefer to stop generation of the current response and edit the previous prompt rather than wait for the response to complete and try and clarify afterwards (which messes up the clarity of the conversation and ease of comprehension when you want to come back to it). In this sense, perhaps the feature does fit in a limited sense with the searchability paradigm of Prompta, as it's helpful to avoid irrelevant chats appearing in search results when that could have been avoided.

NightMachinery commented 8 months ago

Editing not only my own responses but the AI’s is very important. E.g., the easiest jailbreak is to add “Sure, here is how to do X:” to the start of the AI’s message.

There is currently no GUI frontend that supports editing and sane keyboard hotkeys that I know of. These two features are the most important IMO.

iansinnott commented 8 months ago

Maybe I was over thinking this initially. The conversation tree in ChatGPT is quite nifty, but would require changes to how data is stored. However, simply making chats editable would be relatively straightforward.

What do you guys think about that? In other words, there is no tree. if you edit a chat message the older message is not preserved, but you can edit messages in the thread and then re-trigger a response generation.

iansinnott commented 8 months ago

@NightMachinery what do you think would be sensible keyboard hotkeys?

ouroborus commented 8 months ago

How struanb describes it is essentially how I use ChatGPT as well. I'm not so much interested in specifically a tree'd conversation, just in the ability to edit my prior prompts and then have the AI continue from that.

The idea to also have response editing would be great and seems like it would be largely the same code. If we also had the ability to clone conversations, we'd have all the bits for a tree'd conversation without actually being tree'd but being easier to develop.

struanb commented 8 months ago

@iansinnott What you suggest sounds good to me.

Can someone explain to me what the purpose of response editing is? Someone used the word 'jailbreak' in connection with that. What's the point of this?

struanb commented 8 months ago

Just wanted to note a further use-case for this I just had: dealing with a network error. Currently, on network error after entering a prompt, an error popup is displayed but the prompt sits in the chat doing nothing useful. To proceed, I had to manually copy-and-paste it into the prompt again. (In fact it would be preferable if the prompt stayed sitting in the text box until it was successfully sent; even so, network errors could still occur after response generation had started and the response was incomplete).

If there were an edit button, I imagine it would be enough to click it and hit enter to resend the prompt. If there were a regenerate icon, it might be enough for that to perform the same function as both clicking edit and hitting enter.

In both cases I suppose that these actions would wipe all chat below the prompt you acted on (unless you want to give the user the option, as you suggested, to duplicate the entire chat and proceed with the edit/regenerate action on the duplicate).

Hope that makes sense.

iansinnott commented 8 months ago

https://github.com/iansinnott/prompta/assets/3154865/fff40df3-1c66-48e8-ace7-96d796bcbd19

This is all totally undocumented, so here's the demo. Let me know if this solves you guys' use cases.