AIChatMessageToolCall class final
A client-defined tool that the model wants to call.
- Inheritance
-
- Object
- AIChatMessageContentBlock
- AIChatMessageToolCall
- Annotations
-
- @immutable
Constructors
-
AIChatMessageToolCall({required String id, required String name, required String argumentsRaw, required Map<
String, dynamic> arguments, int? index, bool isMergeable = true, Map<String, dynamic> providerData = const {}}) -
A client-defined tool that the model wants to call.
const
-
AIChatMessageToolCall.fromMap(Map<
String, dynamic> map) -
Converts a map to a tool-call block.
factory
Properties
-
arguments
→ Map<
String, dynamic> -
The arguments to pass to the tool in JSON Map format.
final
- argumentsRaw → String
-
The raw arguments JSON string (needed to parse streaming responses).
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- id → String
-
Stable provider identifier for this block, when available.
finalinherited
- index → int?
-
Position assigned to this block by the provider's streaming protocol.
finalinherited
- isMergeable → bool
-
Whether later streaming chunks may be merged into this block.
finalinherited
- name → String
-
The name of the tool to call.
final
-
providerData
→ Map<
String, dynamic> -
Provider-specific data, nested under a provider namespace.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- streamIdentity → String?
-
A stable identity that can be used to merge streamed chunks.
no setterinherited
Methods
-
canMerge(
AIChatMessageContentBlock other) → bool -
Whether
otheris a chunk of the same logical streaming block.inherited -
concat(
AIChatMessageContentBlock other) → AIChatMessageContentBlock -
Merges a later streaming chunk into this block.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> -
Converts this block to a map.
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
covariant AIChatMessageToolCall other) → bool -
The equality operator.
override