enh: support chat events like status or replace via SSE #3239

Closed
opened 2025-11-11 15:26:34 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @mpangrazzi on GitHub (Jan 10, 2025).

Feature Request

Hi!

It seems that ATM the chat events like replace, status and message are handled from a websocket, which can be driven by e.g. the event emitter in Pipe(s), but too bad not in Pipelines or any other custom backend which instead send SSE events and currently frontend expects only OpenAI-compatible message format from that source.

It would be great if chat events can be streamed not only via internal WebSocket but also via SSE as well, allowing any custom backend (and also Pipelines) to create nice custom UX while building agents.

Example:

A Pipeline which:

  • initially send a couple of status events (while some custom code is running), triggering the spinner and status message
  • then send chat completion event
  • then replace it

I've written about it also (written also here), it seems that other users may be interested on that.

Originally created by @mpangrazzi on GitHub (Jan 10, 2025). # Feature Request Hi! It seems that ATM the chat events like `replace`, `status` and `message` are handled [from a websocket](https://github.com/open-webui/open-webui/blob/1dfb479d367e5f5902f051c823f9aef836e04791/src/lib/components/chat/Chat.svelte#L372), which can be driven by e.g. the event emitter in [Pipe](https://docs.openwebui.com/features/plugin/functions/pipe/#detailed-breakdown)(s), but too bad not in Pipelines or any other custom backend which instead send [SSE events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events) and currently frontend expects only OpenAI-compatible message format from that source. It would be great if chat events can be streamed not only via internal WebSocket but also via SSE as well, allowing any custom backend (and also Pipelines) to create nice custom UX while building agents. Example: A Pipeline which: - initially send a couple of `status` events (while some custom code is running), triggering the spinner and status message - then send chat completion event - then replace it I've written about it also (written also [here](https://github.com/open-webui/pipelines/issues/225#issuecomment-2580314984)), it seems that other users may be interested on that.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#3239