JsonSchemaResponseFormat class
JSON schema response format for structured outputs.
- Inheritance
-
- Object
- ResponseFormat
- JsonSchemaResponseFormat
- Annotations
-
- @immutable
Constructors
-
JsonSchemaResponseFormat({required String name, required Map<
String, dynamic> schema, String? description, bool strict = true}) -
Creates a JsonSchemaResponseFormat.
const
-
JsonSchemaResponseFormat.fromJson(Map<
String, dynamic> json) -
Creates a JsonSchemaResponseFormat from JSON.
factory
Properties
- description → String?
-
A description of the response format.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- name → String
-
The name of the response format.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
schema
→ Map<
String, dynamic> -
The JSON Schema that the output must conform to.
final
- strict → bool
-
Whether to enable strict schema adherence.
final
- type → String
-
The type identifier for this format.
no setteroverride
Methods
-
copyWith(
{String? name, Map< String, dynamic> ? schema, Object? description = unsetCopyWithValue, bool? strict}) → JsonSchemaResponseFormat - Creates a copy with the given fields replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Converts to JSON.
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override