ToolInvocation class

Tool invocation state and data for rendering in the UI

Constructors

ToolInvocation({required String toolCallId, required String toolName, required ToolCallState state, dynamic input, dynamic output, String? errorText, bool? providerExecuted, String? title})
const
ToolInvocation.fromPart(ToolUIPart part)
Creates a tool invocation from a ToolUIPart
factory

Properties

errorText String?
final
hasError bool
Whether the tool encountered an error
no setter
hashCode int
The hash code for this object.
no setterinherited
hasInputAvailable bool
Whether the tool has complete input
no setter
hasOutputAvailable bool
Whether the tool has output available
no setter
input → dynamic
final
isDenied bool
Whether the tool execution was denied
no setter
isInputStreaming bool
Whether the tool is currently streaming input
no setter
output → dynamic
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
providerExecuted bool?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state ToolCallState
final
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
title String?
final
toolCallId String
final
toolName String
final

Methods

copyWith({String? toolCallId, String? toolName, ToolCallState? state, dynamic input, dynamic output, String? errorText, bool? providerExecuted, String? title}) ToolInvocation
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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