mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-21 09:01:47 -05:00
[PR #24124] [CLOSED] FIX: Issue#23733 - Ydoc_streaming_chat #66367
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?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/24124
Author: @rgaricano
Created: 4/25/2026
Status: ❌ Closed
Base:
main← Head:dev-Yjs_streaming_chat📝 Commits (1)
4e847adFIX:23733 - Ydoc_streaming_chat📊 Changes
5 files changed (+393 additions, -9 deletions)
View changed files
📝
backend/open_webui/socket/main.py(+33 -2)📝
backend/open_webui/socket/utils.py(+111 -2)📝
backend/open_webui/utils/middleware.py(+33 -5)📝
src/lib/components/chat/Messages/ResponseMessage.svelte(+20 -0)➕
src/lib/utils/ChatMessageYjs.ts(+196 -0)📄 Description
PR to FIX Issue #23733 (https://github.com/open-webui/open-webui/issues/23733) as I drew it in https://github.com/open-webui/open-webui/issues/23733#issuecomment-4265946838
This is a draft for using Ydoc to transmit message updates and address the main issue described in https://github.com/open-webui/open-webui/issues/23733.
It's basic: it opens a Ydoc for any transmitted message, calculates the Ydoc updates, and transmits only those updates, with basic support for emitters and Redis. I've applied it to the reasoning block, but it can easily be added to other serializations (if needed).
Since it's a draft, I've implemented a new, dedicated Ydoc manager class and left the existing Ydoc manager unchanged.
I've done some testing, and it seems to work correctly, as expected, but in my current setup, it's difficult to work on it properly (slow connection on mobile device, home remote dev server, no pods, etc.). Please review and test it.
BR
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.