ResponseFormat constructor
ResponseFormat({
- required ResponseFormatType type,
- Map<
String, dynamic> ? schema, - String? name,
- bool? strict,
Implementation
ResponseFormat({
required this.type,
this.schema,
this.name,
this.strict,
}) {
if (type == ResponseFormatType.jsonSchema && schema == null) {
throw ArgumentError(
'schema is required when type is ResponseFormatType.jsonSchema',
'schema',
);
}
}