Tool class
Represents a tool that can be used in chat
Constructors
- Tool.new({required String toolType, required FunctionTool function})
-
const
-
Tool.fromJson(Map<
String, dynamic> json) -
factory
- Tool.function({required String name, required String description, required ParametersSchema parameters})
-
Create a function tool
factory
Properties
- function → FunctionTool
-
The function definition if this is a function tool
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- toolType → String
-
The type of tool (e.g. "function")
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited