OpenAIFunctionProperty.primitive constructor
OpenAIFunctionProperty.primitive({})
This class is used to represent an OpenAI function property. This a factory constructor that allows you to create a new function property with a primitive type.
Implementation
factory OpenAIFunctionProperty.primitive({
required String name,
String? description,
bool isRequired = false,
required String type,
List? enumValues,
}) {
return OpenAIFunctionProperty(
name: name,
isRequired: isRequired,
typeMap: {
'type': type,
if (description != null) 'description': description,
if (enumValues != null) 'enum': enumValues,
},
);
}