Class ResponseFormatJsonSchema.JsonSchema.Builder
-
- All Implemented Interfaces:
public final class ResponseFormatJsonSchema.JsonSchema.Builder
A builder for JsonSchema.
-
-
Method Summary
-
-
Method Detail
-
name
final ResponseFormatJsonSchema.JsonSchema.Builder name(String 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
final ResponseFormatJsonSchema.JsonSchema.Builder name(JsonField<String> 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.
-
description
final ResponseFormatJsonSchema.JsonSchema.Builder description(String description)
A description of what the response format is for, used by the model to determine how to respond in the format.
-
description
final ResponseFormatJsonSchema.JsonSchema.Builder description(JsonField<String> description)
A description of what the response format is for, used by the model to determine how to respond in the format.
-
schema
final ResponseFormatJsonSchema.JsonSchema.Builder schema(ResponseFormatJsonSchema.JsonSchema.Schema schema)
The schema for the response format, described as a JSON Schema object.
-
schema
final ResponseFormatJsonSchema.JsonSchema.Builder schema(JsonField<ResponseFormatJsonSchema.JsonSchema.Schema> schema)
The schema for the response format, described as a JSON Schema object.
-
strict
final ResponseFormatJsonSchema.JsonSchema.Builder strict(Boolean strict)
Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the
schema
field. Only a subset of JSON Schema is supported whenstrict
istrue
. To learn more, read the Structured Outputs guide.
-
strict
final ResponseFormatJsonSchema.JsonSchema.Builder strict(Boolean strict)
Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the
schema
field. Only a subset of JSON Schema is supported whenstrict
istrue
. To learn more, read the Structured Outputs guide.
-
strict
final ResponseFormatJsonSchema.JsonSchema.Builder strict(Optional<Boolean> strict)
Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the
schema
field. Only a subset of JSON Schema is supported whenstrict
istrue
. To learn more, read the Structured Outputs guide.
-
strict
final ResponseFormatJsonSchema.JsonSchema.Builder strict(JsonField<Boolean> strict)
Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the
schema
field. Only a subset of JSON Schema is supported whenstrict
istrue
. To learn more, read the Structured Outputs guide.
-
additionalProperties
final ResponseFormatJsonSchema.JsonSchema.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final ResponseFormatJsonSchema.JsonSchema.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final ResponseFormatJsonSchema.JsonSchema.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final ResponseFormatJsonSchema.JsonSchema.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final ResponseFormatJsonSchema.JsonSchema.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final ResponseFormatJsonSchema.JsonSchema build()
-
-
-
-