ResponseFormat class final

How the model's answer should be shaped.

Annotations
  • @immutable

Constructors

ResponseFormat.jsonSchema({required String name, required JsonSchema schema, bool strict = true})
Constrains the answer to schema.
factory

Properties

hashCode int
The hash code for this object.
no setteroverride
kind ResponseFormatKind
Which of the three formats this is.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
schema → JsonSchema?
The required shape, for ResponseFormatKind.jsonSchema.
final
schemaName String?
Provider-facing name of the schema.
final
strict bool
Whether conformance is guaranteed rather than merely requested.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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

Constants

json → const ResponseFormat
Syntactically valid JSON, of unspecified shape.
text → const ResponseFormat
Free-form text. The default.