AiTool class

A developer-facing tool that can be registered with the AI assistant. Combines a ToolDefinition with an executable handler function.

Constructors

AiTool({required String name, required String description, Map<String, ToolParameter> parameters = const {}, List<String> required = const [], required Future<Map<String, dynamic>> handler(Map<String, dynamic> args)})
const

Properties

description String
final
handler Future<Map<String, dynamic>> Function(Map<String, dynamic> args)
final
hashCode int
The hash code for this object.
no setterinherited
name String
final
parameters Map<String, ToolParameter>
final
required List<String>
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
toDefinition() ToolDefinition
Convert to a ToolDefinition (without the handler).
toString() String
A string representation of this object.
inherited

Operators

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