StreamAccumulator class

Accumulates tokens from a stream into a complete response Matches iOS StreamAccumulator from Features/LLM/StructuredOutput/StreamAccumulator.swift

Constructors

StreamAccumulator()

Properties

hashCode int
The hash code for this object.
no setterinherited
isComplete bool
Whether the stream is complete
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text String
Get the accumulated text
no setter
tokenCount int
Get token count
no setter
tokens List<StreamToken>
Get all accumulated tokens
no setter

Methods

addToken(StreamToken token) → void
Add a token to the accumulator
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset() → void
Clear the accumulator
toString() String
A string representation of this object.
inherited

Operators

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