@chinmaymk/aikit / StreamChunk
Interface: StreamChunk
Defined in: types.ts:145
A little piece of the streaming response. It's like getting your data one delicious drop at a time.
Properties
content
content:
string
Defined in: types.ts:147
The full content of the response so far. It's cumulative, like student loan debt.
delta
delta:
string
Defined in: types.ts:149
The new bit of content that just arrived in this chunk. The delta.
finishReason?
optional
finishReason:FinishReason
Defined in: types.ts:154
If the generation is done, this tells you why. Did it stop gracefully, run out of tokens, or decide to use a tool? The suspense is killing us.
toolCalls?
optional
toolCalls:ToolCall
[]
Defined in: types.ts:156
Any tool calls that came through in this chunk. The plot thickens.
reasoning?
optional
reasoning:object
Defined in: types.ts:158
Reasoning content when available. The model's internal reasoning process.
content
content:
string
The full reasoning content so far. Cumulative like content.
delta
delta:
string
The new bit of reasoning content that just arrived in this chunk.
usage?
optional
usage:GenerationUsage
Defined in: types.ts:165
Usage information for this chunk. Typically only available in the final chunk.