Even out the stream
Buffer bursty LLM output, release it at an even pace and reveal it as a wave. Below, the same answer streams twice: once as it arrives, once smoothed.
Buffer bursty LLM output, release it at an even pace and reveal it as a wave. Below, the same answer streams twice: once as it arrives, once smoothed.
smooth-stream-text paces streamed text on the client. You hand it the answer received so far and whether it is finished; it returns a prefix that grows at an even, adaptive rate, which you render with the Markdown renderer you already use. The rate follows the backlog, so there is no speed to tune per model.
The core has no dependencies and runs without a DOM. React, Vue and Svelte bindings and a
<smooth-stream-text> Web Component are included. A fade-in reveal is optional.
It fits when text arrives in bursts, you want to keep your renderer, and history must
appear at once while only new answers are paced. Cuts never split an emoji or leave a half-written link or
** on screen.
It does not fit for static Markdown, network retries, or a CSS typing effect, and you do not need it if one layer already paces your text well.