-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: regenerate in Chat
, agent
and Chatflow
app
#7661
base: main
Are you sure you want to change the base?
Conversation
chat
and agent
appChat
, agent
and Chatflow
app
web/app/components/base/icons/assets/vender/line/general/MaterialSymbolsRefresh.svg
Outdated
Show resolved
Hide resolved
I tried regenerating both conversation histories 1 and 2. They display correctly in the WebApp. However, after regenerating, the regenerated records are also shown in the App Log, and they are sorted by time. I think the App Log should, by default, only display the regenerated records. If possible, it would be great to add |
This is exactly the next PR I will create (currently at xuzuodong#1). I separated this to another PR so that changes of files and codes won't be that much and can be easier to review. |
Is it possible to keep only the last record this time? Showing it all in the Log can be confusing for app maintainers. |
The For the first message in a conversation and the first regenerated message, their These two cases need to be distinguished to support left-right conversation switching in next implementation. |
Sure, will do it today. |
And after this PR take effect, all non-head sent messages will have a valid UUID (non NULL and non UUID_NIL). Let me show some images to explain this more accurately
Note that the first message with id
Here's what's going to happen: The newly created message will also be a head message. That said, if a message's
|
I see what UUID_NIL means, if you don't do that, you have to batch update the parent-child ID data via script, and there will be a longer data break when updating the service, it's really better this way
I see what UUID_NIL means, if don't do that, you have to batch update the parent-child ID data via script, and there will be a longer data break when updating the service, it's really better this way. |
Description
Fixes #7161
Support mode: Chatbot, Agent and Chatflow mode
The regenerate button can be accessed via
The regenerate button won't be displayed in
Completion and Workflow mode should not be affected by this PR.
All sent messages in Chatbot, Agent and Chatflow have
parent_message_id
field now for future considerations (important for implementing branched chat history tree).Demonstration
2024-08-26.18.10.32.mov
2024-08-30.16.49.09.mov
Known issue
The Chatflow run history and log detail view are designed to display all historical messages. However, for now, it is flattened and displays all messages simultaneously, rather than offering an interactive UI to toggle between different threads.
I've already implemented this fix in a separated PR xuzuodong#1, so we can look into this later.
Database migration caveat
A new field,
parent_message_id
, will be added to themessages
table. All existing messages will be set to a special value for future compatibility:00000000-0000-0000-0000-000000000000
.Type of Change
Testing Instructions
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration