LlmChunk class
Streaming chunk.
Constructors
- LlmChunk({String? content, bool isDone = false, LlmToolCall? toolCall, LlmUsage? usage, int? index})
-
const
-
LlmChunk.fromJson(Map<
String, dynamic> json) -
Create from JSON.
factory
Properties
- content → String?
-
Content delta.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int?
-
Index in the stream.
final
- isDone → bool
-
Whether this is the final chunk.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- toolCall → LlmToolCall?
-
Tool call in progress.
final
- usage → LlmUsage?
-
Final usage (only in last chunk).
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Convert to JSON.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited