mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-19 13:35:20 -05:00
feat: copying or forking chat conversations #968
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Arcitec on GitHub (May 19, 2024).
Originally assigned to: @tjbck on GitHub.
Is your feature request related to a problem? Please describe.
SometimesVery often, I want to try different directions, without messing up the main "workbook". Currently, I cannot find any way in Open WebUI to copy or fork a conversation.If it was possible to fork things, it would mean that we can finally try out different ideas, while having a totally separate branch for those tests, which we can refer back to anytime to manually copy interesting aspects into the main workbook.
We can then delete those branches/copies when they are no longer needed.
I've seen other Ollama frontends with the "duplicate conversation" feature, so there's clearly some interest in the feature.
Describe the solution you'd like
Describe alternatives you've considered
I've considered using the existing ability to delete parts of a conversation, and to try things in the main workbook, but here are the issues with that:
It would just be so much easier to work with the LLM if we could copy a conversation, run experiments, and then delete the temporary copy.
Additional context
Matt Williams had a great video showcasing this exact feature in another frontend UI:
https://youtu.be/cdAb5CigAgQ?t=179
@Arcitec commented on GitHub (May 20, 2024):
@tjbck I sincerely appreciate that you decided to consider this idea.
Something else just hit me. Even if there's no GUI whatsoever for it, it would be a good idea to remember the relationship between branched conversations, by having a table with the following fields:
source_id: The original conversation's ID.source_message_id: The exact message ID that started the branch. (The final/last message's ID, if not branched from a specific message.)target_id: The new branched conversation's ID.target_message_id: Just the message ID of the last message in the copied branch, meaning "this is where the branch was created".Then, whenever a branch is created, record these entries.
Whenever any conversation is deleted, delete all entries from that table where either
source_idortarget_idis equal to the deleted conversation.Having this recorded historically, even if there's no GUI to see the information, would be very useful for a few reasons:
"if conversation_id exists in target_id column of link_table", it means that it was a branch, and makes it possible to mark the conversation with a special "this is a branch" icon. That's an example of a trivial GUI change that would immediately make it clear which one is the original and which is the branch."if conversation_id exists in source_id column of link_table"to know that branches have been created, and then recursively querying each of those branched IDs to generate a tree of all children, and displaying it to the user.None of that would be interesting at all to an initial "minimum viable product", but would be invaluable to anyone who wants to make visualizations or branch management tools in the future.
So recording that branch relationship information in a secret database table for now would be a good move. :)
@tjbck commented on GitHub (May 31, 2024):
Added to dev, let me know if you encounter any issues!
As for the visualisation feature request, that would be a great addition indeed. It would be deemed as low priority but feel free to open up a separate issue post, PR welcome as always!
@sakoht commented on GitHub (Jan 22, 2025):
This seems like it will happen and become a fixture of how user flows work. But be a bit of work.
Exciting to have clone @tjbck.
I wonder if the simplest path for whoever implements it will be:
This might be the most minimal change for the next step. Though one could imagine fancier UIs, they could come later.
I may try to do this myself, but if others have already started on it would love to see a note to avoid duplication.
@Pl8tinium commented on GitHub (Mar 11, 2025):
i would love to see this solved in a similar way like librechat has done it
proper dialogue branching tools can hugely benefit chat workflows, especially when you want to explore ideas and dont want previous context to mush up your new responses
@mr-jovani-van-bread commented on GitHub (May 24, 2025):
@Pl8tinium I have to agree with you, that would be a great feature. Librechat is very good with that feature.
@sakoht commented on GitHub (May 29, 2025):
When I posted this request I didn't realize it already works! Of course something clever to show the tree would be cool, but I don't know that anyone has done this in similar applications.