OpenAI::TextResponseFormatJsonSchema
Inherits JSON::Serializable < Reference < Object
JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.
Constructors
new(pull : JSON::PullParser)
Sourcenew(type_value : TextResponseFormatJsonSchemaType = TextResponseFormatJsonSchemaType::JsonSchema, description : String | Nil = nil, name : String = "", schema : ResponseFormatJsonSchemaSchema = ResponseFormatJsonSchemaSchema.new, strict : TextResponseFormatJsonSchemaStrict | Nil = nil)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceInstance methods
description
A description of what the response format is for, used by the model to determine how to respond in the format.
A description of what the response format is for, used by the model to determine how to respond in the format.
name
The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
name=(name : String)
The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
schema
Sourceschema=(schema : ResponseFormatJsonSchemaSchema)
Sourcestrict
Sourcestrict=(strict : TextResponseFormatJsonSchemaStrict | Nil)
Sourcetype_value=(type_value : TextResponseFormatJsonSchemaType)
The type of response format being defined. Always json_schema.