ToolPart class final

A tool interaction part of a message.

Inheritance
Annotations

Constructors

ToolPart.call({required String callId, required String toolName, required Map<String, Object?>? arguments})
Creates a tool call part.
const
ToolPart.fromJson(Map<String, Object?> json)
Creates a tool part from a JSON-compatible map.
factory
ToolPart.result({required String callId, required String toolName, required Object? result})
Creates a tool result part.
const

Properties

arguments Map<String, Object?>?
The arguments for a tool call (null for results).
final
argumentsRaw String
The arguments as a JSON string.
no setter
callId String
The unique identifier for this tool interaction.
final
hashCode int
The hash code for this object.
no setteroverride
kind ToolPartKind
The kind of tool interaction.
final
result Object?
The result of a tool execution (null for calls).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
toolName String
The name of the tool.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, Object?>
Serializes the part to a JSON map.
override
toString() String
A string representation of this object.
override

Operators

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

Constants

type → const String