Tool<TInput extends Object> class
A tool that can be called by the LLM.
Constructors
Properties
- description → String
-
Used to tell the model how/when/why to use the tool. You can provide
few-shot examples as a part of the description.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- inputSchema → Schema
-
Schema to parse and validate tool's input arguments. Following the JSON
Schema specification.
finalinherited
- name → String
-
The unique name of the tool that clearly communicates its purpose.
finalinherited
- onCall → FutureOr Function(TInput input)
-
The function that will be called when the tool is run.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
call(
Map< String, dynamic> arguments) → Future - Runs the tool.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object?> -
Serializes the tool to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited