Search⌘ K
AI Features

From a Fixed Response to a Streamed Response

Explore how fixed and streamed AI responses differ and impact frontend design. Learn to manage partial content, split in-progress states, and handle incomplete streams effectively for smoother user experiences.

A retrieved value is either there or it isn't. A completion is produced token by token, which means it can start arriving before it's finished. That turns a wait into something the user watches happen, and it changes what the interface has to keep track of.

We'll cover the following:

  • Two ways a response can arrive

  • What streaming changes in the request lifecycle

  • What the interface has to handle

  • Choosing between the two

Two ways a response can arrive

A fixed response arrives complete. The client sends a request, waits, and receives the whole answer at once.

A streamed response arrives in pieces. The client sends a request and begins receiving parts of the answer while the rest is still being produced.

Both come from the same kind of request. The difference is when the client is ...