ToolDefinition<TInput extends Object> class

A tool that can be called by the LLM.

Constructors

ToolDefinition({required String name, required String description, Schema? inputSchema})
Creates a ToolDefinition.
ToolDefinition.fromJson(Map<String, Object?> json)
Deserializes a tool from a JSON map.
factory

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.
final
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.
final
name String
The unique name of the tool that clearly communicates its purpose.
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, Object?>
Serializes the tool to a JSON map.
toString() String
A string representation of this object.
inherited

Operators

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