StructuredOutputFormat class

Defines rules for structured output responses based on OpenAI's structured output requirements.

API Reference: https://platform.openai.com/docs/guides/structured-outputs

Constructors

StructuredOutputFormat.new({required String name, String? description, Map<String, dynamic>? schema, bool? strict})
const
StructuredOutputFormat.fromJson(Map<String, dynamic> json)
factory

Properties

description String?
The description of the schema
final
hashCode int
The hash code for this object.
no setterinherited
name String
Name of the schema
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
schema Map<String, dynamic>?
The JSON schema for the structured output
final
strict bool?
Whether to enable strict schema adherence
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toOpenAIResponseFormat() Map<String, dynamic>
Convert to OpenAI response_format
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited