pub struct TextResponseFormatJsonSchema {
pub description: Option<String>,
pub name: String,
pub schema: ResponseFormatJsonSchemaSchema,
pub strict: Option<bool>,
}
Expand description
JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.
Fields§
§description: Option<String>
A description of what the response format is for, used by the model to determine how to respond in the format.
name: String
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.
schema: ResponseFormatJsonSchemaSchema
§strict: Option<bool>
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.
Implementations§
Source§impl TextResponseFormatJsonSchema
impl TextResponseFormatJsonSchema
Sourcepub fn builder() -> TextResponseFormatJsonSchemaBuilder<((), (), (), ())>
pub fn builder() -> TextResponseFormatJsonSchemaBuilder<((), (), (), ())>
Create a builder for building TextResponseFormatJsonSchema
.
On the builder, call .description(...)
(optional), .name(...)
, .schema(...)
, .strict(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of TextResponseFormatJsonSchema
.
Trait Implementations§
Source§impl Clone for TextResponseFormatJsonSchema
impl Clone for TextResponseFormatJsonSchema
Source§fn clone(&self) -> TextResponseFormatJsonSchema
fn clone(&self) -> TextResponseFormatJsonSchema
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for TextResponseFormatJsonSchema
impl Debug for TextResponseFormatJsonSchema
Source§impl<'de> Deserialize<'de> for TextResponseFormatJsonSchema
impl<'de> Deserialize<'de> for TextResponseFormatJsonSchema
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl PartialEq for TextResponseFormatJsonSchema
impl PartialEq for TextResponseFormatJsonSchema
Source§fn eq(&self, other: &TextResponseFormatJsonSchema) -> bool
fn eq(&self, other: &TextResponseFormatJsonSchema) -> bool
self
and other
values to be equal, and is used by ==
.