OpenAIFunctionProperty.string constructor

OpenAIFunctionProperty.string({
  1. required String name,
  2. String? description,
  3. bool isRequired = false,
  4. List<String>? enumValues,
})

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 string type.

Implementation

factory OpenAIFunctionProperty.string({
  required String name,
  String? description,
  bool isRequired = false,
  List<String>? enumValues,
}) {
  return OpenAIFunctionProperty.primitive(
    name: name,
    isRequired: isRequired,
    type: functionTypeString,
    description: description,
    enumValues: enumValues,
  );
}