JsonSchema

data class JsonSchema(val name: String, val description: String? = null, val schema: JsonObject? = null, val strict: Boolean? = null) : OpenAIResponseFormat

Structured JSON Schema response format.

Constructors

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

Properties

Link copied to clipboard

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

Link copied to clipboard

The name of the response format (a-z, A-Z, 0-9, underscores, dashes; max 64 chars).

Link copied to clipboard
val schema: JsonObject?

The JSON Schema for the response format, described as a JSON object. null omits the field.

Link copied to clipboard

Whether to enable strict schema adherence. If true, the model always follows the exact schema. null omits the field (provider default applies).