Turbo Stream is a custom HTML tag that is available to us when building Hotwired apps. We can deliver Turbo Streams in three ways:
- By simply adding the tag to the DOM we can trigger updates to sections of the page when it self-activates
- By returning a special type of document that only contains Turbo Stream tags with a custom MIME type, this way we can respond to a form submission without disrupting the entire page, but instead only update the sections we want to
- By broadcasting the tags to all connected users via WebSockets/SSE, which allows us to build dynamic and collaborative UI experiences.
This is all cool and works well. However, when I was building an LLM Playground type of application, I thought it would be cool to be able to respond to a form submission with Turbo Streams, but using HTTP streaming, instead of having to wait for the full document to be generated or to push the generation and updates to a queued job. This was a nice experiment, so I figured it would make for a good video.

The main idea is to augment Turbo, similar to how Turbo itself does the content negotiation for the custom Turbo Stream document MIME type (we'll source-dive into how Turbo does it).
Check out the video on YouTube if you're curious.