openai_struct/models/json_schema.rs
1/*
2 * OpenAI API
3 *
4 * The OpenAI REST API. Please see pub https://platform.openai.com/docs/api-reference for more details.
5 *
6 * OpenAPI spec pub version: 2.3.0
7 *
8 * Generated pub by: https://github.com/swagger-api/swagger-codegen.git
9 */
10
11/// pub JsonSchema : Structured Outputs configuration options, including a JSON Schema.
12
13#[allow(unused_imports)]
14use serde_json::Value;
15
16#[derive(Debug, Serialize, Deserialize)]
17pub struct JsonSchema {
18 /// A description of what the response format is for, used by the model to determine how to respond in the format.
19 #[serde(rename = "description")]
20 pub description: Option<String>,
21 /// 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.
22 #[serde(rename = "name")]
23 pub name: String,
24 #[serde(rename = "schema")]
25 pub schema: Option<crate::models::ResponseFormatJsonSchemaSchema>,
26 /// 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`. To learn more, read the [Structured Outputs guide](/docs/guides/structured-outputs).
27 #[serde(rename = "strict")]
28 pub strict: Option<bool>,
29}