FunctionCall class

Represents a specific request from the AI model to execute an external function.

When the AI determines that a specific tool or action is required, it returns a FunctionCall containing the target name and the necessary args mapped to the function's schema.

Constructors

FunctionCall({required String name, Map<String, dynamic> args = const {}})
FunctionCall.fromJson(Map<String, dynamic> json)
Creates a FunctionCall instance from a JSON map.
factory

Properties

args Map<String, dynamic>
A map of arguments provided by the AI, intended to be passed into the function execution. Defaults to an empty map if no arguments are provided.
final
hashCode int
The hash code for this object.
no setterinherited
name String
The unique identifier or name of the function to be invoked.
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>
Converts the function call into a JSON-compatible map.
toString() String
A string representation of this object.
inherited

Operators

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