ggozad/oterm

Retry, Continue, Reword, Pop, Edit, Fake and Dictate last answer.

Closed this issue · 2 comments

It would be nice to be able to act on the last answer or force the AI into some schema:

Retry - Send the same prompt again and replace the answer (in one step)
Continue - Send the last prompt + the current answer to let the llm continue the answer.
Reword - Delete the last answer and the last promt, then set the last prompt into the entry field so it can be edited.
Pop - (alternative) delete the last answer/prompt (having /pop 3 to remove the last x turns would be even nicer)
Edit - Copy the answer of the llm into the input and let us modify it, to manipulate the AI
Fake - Let us write an answer and make the chat history look like the model did answer this.
Dictate - Let us write a Prompt and then after some special character, start the answer of the model so it will continue with those words.

These are similar to what textgen-gui and memgpt offer (where I implemented some of that for memgpt)

That's a lot to digest.
I find it hard to see how this would be incorporated in oterm while keeping it simple. There are also some obstacles, primarily that all these would necessitate a recalculation of the context embeddings to be done properly.
I do not see myself working on this, but if you come up with a PR I am happy to reconsider.

I did not look at the context embedding creation, but I imagine, that one could delay the update until it is clear that there will be no change to the last "turn". This should make it fairly simple to implement most of these functions. Or do I miss something here?

For implementation it could be as simple as using additional ctrl+key or modifier on return (if that library let's one check for that).

I think I am going to write a client myself, as I am primarily a Go programmer and there are quite some cool new libraries surfacing right now which make it possible to do what I love: Everything Go :). So feel free to close this issue if you do not want this functionalities.