[PR #24124] [CLOSED] FIX: Issue#23733 - Ydoc_streaming_chat #114821

Closed
opened 2026-05-18 15:39:42 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/24124
Author: @rgaricano
Created: 4/25/2026
Status: Closed

Base: mainHead: dev-Yjs_streaming_chat


📝 Commits (1)

  • 4e847ad FIX: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

Note

Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/24124 **Author:** [@rgaricano](https://github.com/rgaricano) **Created:** 4/25/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `dev-Yjs_streaming_chat` --- ### 📝 Commits (1) - [`4e847ad`](https://github.com/open-webui/open-webui/commit/4e847ad2335848e65e53cf06eab52eee96bdf45d) FIX:23733 - Ydoc_streaming_chat ### 📊 Changes **5 files changed** (+393 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `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) </details> ### 📄 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 - [X] By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. > [!NOTE] > Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-18 15:39:42 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#114821