DelegatingToolkit class

A Toolkit that forwards every member to inner; override the ones to change.

Inheritance
Implementers

Constructors

DelegatingToolkit(Toolkit inner)

Properties

hashCode → int
The hash code for this object.
no setterinherited
inner → Toolkit
The toolkit it forwards to.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
specs → List<ToolSpec>
The tools, in prompt order.
no setteroverride

Methods

coerce(ToolCall call) → Map<String, Object?>
The model's arguments rewritten leniently, before anything checks them (default: unchanged).
override
confirmationQuestion(ToolCall call, ConfirmationContext context) → String?
The question call asks before it runs; null uses AssistantStrings.confirmDefault.
override
execute(ToolCall call, ToolContext context) → Future<ToolResult>
Runs call. A model's mistake is a ToolFailure; an exception follows AssistantConfig.toolErrors. The call must start synchronously (before the first await): the assistant reads ToolContext.annotations in the same step.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset() → void
A new conversation starts: forget what the old one did (a backend's ledgers).
override
restoreState(Map<String, Object?> state) → void
Takes back what saveState gave, after a reset.
override
saveState() → Map<String, Object?>?
What a conversation snapshot keeps of the toolkit; null for nothing.
override
spec(String name) → ToolSpec?
The spec of name; null for a tool the toolkit does not have (the assistant answers unknown tool).
override
statusLabel(ToolCall call) → String?
The label shown while call runs; null uses AssistantStrings.working.
override
timeoutOf(ToolCall call) → Duration?
Longest wait for call's result; null uses AssistantConfig.toolTimeout.
override
toString() → String
A string representation of this object.
inherited
validate(ToolCall call) → List<String>
The problems of call's (coerced) arguments; empty when valid. Default: validateArguments against the spec.
override

Operators

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