LeapFunction class final
A function that can be called by the model.
Constructors
-
LeapFunction({required String name, required String description, required Map<
String, dynamic> parameters}) -
Creates a new LeapFunction.
const
-
LeapFunction.fromMap(Map<
String, dynamic> map) -
Creates a LeapFunction from a JSON map.
factory
- LeapFunction.withSchema({required String name, required String description, required JsonSchema schema})
-
Creates a LeapFunction with a typed JsonSchema for parameters.
factory
Properties
- description → String
-
A description of what the function does.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- name → String
-
The name of the function.
final
-
parameters
→ Map<
String, dynamic> -
JSON Schema describing the function parameters.
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
-
toMap(
) → Map< String, dynamic> - Converts this function to a JSON map.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override