ToolCallStreamingBlock class final

Accumulating tool-call block with partial JSON arguments.

Inheritance

Constructors

ToolCallStreamingBlock({required String id, required String name, int? streamIndex, Map<String, dynamic>? initialArguments})
Creates a tool-call block.

Properties

arguments ↔ Map<String, dynamic>
Parsed arguments, filled in by finish.
getter/setter pair
finished ↔ bool
Whether finish has run (the block's end event was seen).
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
id ↔ String
Provider-assigned tool call id.
getter/setter pair
initialArguments → Map<String, dynamic>?
Arguments already parsed by the provider at block start (Anthropic tool_use blocks can carry a complete input). Used when no argument deltas ever arrive.
final
name ↔ String
Name of the tool to invoke.
getter/setter pair
partialArgs → StringBuffer
The accumulated raw JSON argument text.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
streamIndex ↔ int?
The provider's stream index for this call (OpenAI tool_calls[].index), when the protocol identifies blocks by index rather than id.
getter/setter pair
thoughtSignature ↔ String?
Provider-specific opaque thought signature (OpenRouter encrypted reasoning detail attached to this call).
getter/setter pair

Methods

finish() → void
Parses the accumulated partialArgs into arguments and marks the block finished. Called when the provider signals the block's end.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toContentBlock({bool finalize = false}) → ContentBlock
Converts to the immutable ContentBlock carried by event snapshots.
override
toString() → String
A string representation of this object.
inherited

Operators

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