emacs-openai / chatgpt

Use ChatGPT inside Emacs
GNU General Public License v3.0
185 stars 21 forks source link

Edit chat history #22

Open Wheest opened 1 year ago

Wheest commented 1 year ago

Sometimes editing prior messages, including the output of the model is useful for pushing it in the right direction.

This feature is available in the Playground mode.

By default, in this project the ChatGPT chat log buffer is read-only. However, disabling this and editing the chat does not change the data that is passed to the model. I assume that this is because the data in the buffer is not literally the raw data.

You can see an example here where I edit the model's output, and would expect it to give me the capital of Sweden. Essentially, I think a useful feature would be for the chat buffer to be bidirectional.

user: Hello there

[assistant]: General Kenobi!

[assistant]: I apologize for the reference. It's a line from Star Wars: Episode III - Revenge of the Sith. In the movie, when Obi-Wan Kenobi encounters General rievous, he greets him with "Hello there."

user: I see...

~[assistant]: I'm sorry for providing a confusing answer, can I help you with anything today~

editing the assistant output

[assistant]: I am about to tell you the capital of Sweden

user: So, what is it?

[assistant]: I'm sorry, I'm an AI language model and I'm not sure what specifically you are referring to. Could you please provide more context or clarify your question? I'll do my best to assist you.

jcs090218 commented 1 year ago

This is indeed a good idea! I will work on this when I have time! ;)

jcs090218 commented 1 year ago

I've added a couple of features in chatgpt-sideline, but it's still very new. Feel free to try it out!