AIStreamChunk class

A single chunk from a streaming AI response.

Constructors

AIStreamChunk({required String text, bool isComplete = false, AIUsage? usage, String? finishReason, String? provider, String? model, List<AIToolCall>? toolCalls})
const

Properties

finishReason String?
The finish reason (only on the final chunk).
final
hashCode int
The hash code for this object.
no setterinherited
isComplete bool
Whether this is the final chunk.
final
model String?
The model used.
final
provider String?
The provider that generated this chunk.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text String
The text content of this chunk.
final
toolCalls List<AIToolCall>?
Tool invocations requested by the model.
final
usage AIUsage?
Cumulative usage (only available on the final chunk).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited