Enable real-time streaming responses in chat components
stream
prop to false
on any chat component or ChatInput.
stream={false}
:
Uhhh... what is a data-only SSE stream?
data:
messages over a single HTTP connection. The stream mixes plain text and structured JSON, sent as newline-delimited chunks prefixed with data:
.Under the hood, the server emits:Text chunks for incremental message renderingdata:
line as it arrives and handle parsed text or JSON accordingly. This enables real-time, mixed-format updates with minimal overhead.Sample Backend Streaming Handler Implementation