OpenAIFunctionModel class

This class is used to represent an OpenAI function.

Constructors

OpenAIFunctionModel({required String name, required Map<String, dynamic> parametersSchema, String? description})
This class is used to represent an OpenAI function.
const
OpenAIFunctionModel.fromMap(Map<String, dynamic> map)
This method is used to convert a Map<String, dynamic> object to a OpenAIFunctionModel object.
factory
OpenAIFunctionModel.withParameters({required String name, String? description, required Iterable<OpenAIFunctionProperty> parameters})
This class is used to represent an OpenAI function. This a factory constructor that allows you to create a new function with valid parameters schema.
factory

Properties

description → String?
The description of what the function does.
final
hashCode → int
The hash code for this object.
no setteroverride
haveDescription → bool
Weither the function have a description.
no setter
name → String
The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
final
parametersSchema → Map<String, dynamic>
The parameters the functions accepts, described as a JSON Schema object.
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>
This method is used to convert a OpenAIFunctionModel object to a Map<String, dynamic> object.
toString() → String
A string representation of this object.
override

Operators

operator ==(covariant OpenAIFunctionModel other) → bool
The equality operator.
override