Open PaRaD1SE98 opened 1 year ago
Can have a menu to 'squash' the conversation too.
How important is this issue to you?
What do you think would be a good ux flow to have this feature without cluttering the UI?
Not that important, just a bit annoying when having a long chat, because don't want to start over as well as selecting which one to delete.
For the UX flow, currently it behaves like this: I think we can still give this token length warning, but then start a 'KeyMemory' mode automatically. It should be similar to the autoTitle feature, but allow it to be somewhat longer.
Summarize the current chat history in a limited token length which can be adjusted in the settings modal.
(Because a shorter limit -> worse memory quality, larger limit -> shorter future available tokens)
I haven't dived into the store-chats.ts
, but a rough idea is to control the whole chat history displayed on the UI in a new place of the store. Then we deal with each short chat history with OpenAI API internally.
The delete message feature is still useful for users to manually delete meaningless content (before triggering an auto-summary).
Overall, the chat thread could be a long non-editable history concatenated with a latest editable short history. The first message of latest editable short history is the auto-summary result of the last editable short history. (Treat the summary as a normal 'user' message but allow toggling display and editing like a ‘system’ message)
(Maybe make the non-editable history a different bgcolor) (Or still make all history editable for 'export conversation' feature but give a note that editing old history has no effect on auto-summary result)
I like your description/idea of different resolutions for the messages. Meaning to keep the originals and the summary. There are a few things that need to figure out (the summarization operation will be slow, and affecting UX), but in theory history can be managed much better.
Putting also this on the roadmap, because like #216 but not exactly.
Let gpt summarize and shorten the current conversation after every few questions and answers, so that we don't have to manually choose and delete the contents frequently.
Make it a settings switch option so we still have the precise control version.