AITool class

Defines a tool or function that the AI can call.

Constructors

AITool({required String name, required String description, required Map<String, dynamic> parameters, Future<String> execute(Map<String, dynamic> args)?})

Properties

description String
A description of what the function does.
final
execute Future<String> Function(Map<String, dynamic> args)?
The Dart function to execute when the AI invokes this tool.
final
hashCode int
The hash code for this object.
no setterinherited
name String
The name of the function to be called. Must contain only a-z, A-Z, 0-9, or underscores.
final
parameters Map<String, dynamic>
JSON schema defining the parameters the function accepts.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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