[GH-ISSUE #2145] Streaming response with text/event-stream #63262

Closed
opened 2026-05-03 12:46:22 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @radames on GitHub (Jan 22, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/2145

Are you still considering adding text/event-stream for the Streaming Response ? Reading #294, it might make sense to have that option for browser-only clients.

For reference, here is a JavaScript client for text streaming that works on both the browser and Node.js.
https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/tasks/custom/streamingRequest.ts

Originally created by @radames on GitHub (Jan 22, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/2145 Are you still considering adding `text/event-stream` for the Streaming Response ? Reading #294, it might make sense to have that option for browser-only clients. For reference, here is a JavaScript client for text streaming that works on both the browser and Node.js. https://github.com/huggingface/huggingface.js/blob/main/packages/inference/src/tasks/custom/streamingRequest.ts
Author
Owner

@mxyng commented on GitHub (Mar 11, 2024):

Not at this time. As an alternative, you can use the OpenAI compatibility layer which does use server send events

<!-- gh-comment-id:1989250360 --> @mxyng commented on GitHub (Mar 11, 2024): Not at this time. As an alternative, you can use the OpenAI compatibility layer which does use server send events
Author
Owner

@radames commented on GitHub (Mar 11, 2024):

Amazing! @mxyng didn't know about the OpenAI compatibility 👏

<!-- gh-comment-id:1989255011 --> @radames commented on GitHub (Mar 11, 2024): Amazing! @mxyng didn't know about the OpenAI compatibility 👏
Author
Owner

@rutikthakre commented on GitHub (May 22, 2025):

Hey, I am planning to use SSE for Rust application targeting WASM-WASI. So, I want to know if SSE is supported or not. If yes, are there any limitations?

<!-- gh-comment-id:2902281189 --> @rutikthakre commented on GitHub (May 22, 2025): Hey, I am planning to use SSE for Rust application targeting WASM-WASI. So, I want to know if SSE is supported or not. If yes, are there any limitations?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#63262