-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Conversation
chat
and agent
appChat
, agent
and Chatflow
app
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 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. |
* main: (64 commits) chore: Enable Japanese descriptions for Tools (#8646) Make WORKFLOW_* configurable as environment variables. (#8644) feat: add deepseek-v2.5 for model provider siliconflow (#8639) docs: fix predefined_model_scale_out.md redirect error (#8633) feat: add qwen2.5 for model provider siliconflow (#8630) fix: send message error when chatting with opening statement (#8627) fix: llm_generator.py JSONDecodeError (#8504) fix: commands.py (#8483) fix: redundant check for available_document_count (#8491) chore: enhance configuration descriptions (#8624) chore: add Gemini newest experimental models (close #7121) (#8621) feat: support o1 series models for openrouter (#8358) fix: form input add tabIndex (#8478) Add model parameter translation (#8509) feat(tools/cogview): Updated cogview tool to support cogview-3 and the latest cogview-3-plus (#8382) Add Fireworks AI as new model provider (#8428) feat:use xinference tts stream mode (#8616) docs: Add Japanese documentation for tools (#8469) feat: regenerate in `Chat`, `agent` and `Chatflow` app (#7661) feat: update pyproject.toml (#8368) ...
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