Package com.openai.models
Class ResponseFormatJsonSchema
-
- All Implemented Interfaces:
public final class ResponseFormatJsonSchema
JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
ResponseFormatJsonSchema.Builder
A builder for ResponseFormatJsonSchema.
public final class
ResponseFormatJsonSchema.JsonSchema
Structured Outputs configuration options, including a JSON Schema.
-
Method Summary
Modifier and Type Method Description final ResponseFormatJsonSchema.JsonSchema
jsonSchema()
Structured Outputs configuration options, including a JSON Schema. final JsonValue
_type()
The type of response format being defined. final JsonField<ResponseFormatJsonSchema.JsonSchema>
_jsonSchema()
Returns the raw JSON value of jsonSchema. final Map<String, JsonValue>
_additionalProperties()
final ResponseFormatJsonSchema.Builder
toBuilder()
final ResponseFormatJsonSchema
validate()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static ResponseFormatJsonSchema.Builder
builder()
Returns a mutable builder for constructing an instance of ResponseFormatJsonSchema. -
-
Method Detail
-
jsonSchema
final ResponseFormatJsonSchema.JsonSchema jsonSchema()
Structured Outputs configuration options, including a JSON Schema.
-
_type
final JsonValue _type()
The type of response format being defined. Always
json_schema
.Expected to always return the following:
JsonValue.from("json_schema")
However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_jsonSchema
final JsonField<ResponseFormatJsonSchema.JsonSchema> _jsonSchema()
Returns the raw JSON value of jsonSchema.
Unlike jsonSchema, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final ResponseFormatJsonSchema.Builder toBuilder()
-
validate
final ResponseFormatJsonSchema validate()
-
builder
final static ResponseFormatJsonSchema.Builder builder()
Returns a mutable builder for constructing an instance of ResponseFormatJsonSchema.
The following fields are required:
.jsonSchema()
-
-
-
-