JsonSchemaObject

class JsonSchemaObject(val name: String, val description: String? = null, val schema: JsonObject? = null, val strict: Boolean? = null)(source)

Structured Outputs configuration options, including a JSON Schema.

Constructors

Link copied to clipboard
constructor(name: String, description: String? = null, schema: JsonObject? = null, strict: Boolean? = null)

Properties

Link copied to clipboard
val description: String? = null

A description of what the response format is for, used by the model to determine how to respond in the format.

Link copied to clipboard

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.

Link copied to clipboard
val schema: JsonObject? = null

The schema for the response format, described as a JSON Schema object.

Link copied to clipboard
val strict: Boolean? = null

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 when strict is true.