Streaming responses turn waiting into conversation

Understand stream and incremental content to improve chat experiences.

Complete responses versus incremental output

Normal requests return a complete result; streaming delivers content as it is generated. Showing received text early helps users see that an interactive request is progressing.

Read along event boundaries

Network chunks are not complete events. Accumulate data, split events according to the protocol, and extract incremental content. Prefer the streaming interface provided by your SDK.

Let users stop generation

Provide a stop control and cancel its network request when used. Billing for usage already generated depends on the service’s actual rules.

正在加载… / Loading…重新加载 / Reload