pub enum ModelTextOutputFormat {
Text {},
Json {},
JsonSchema {
schema: SchemaReference,
},
}Expand description
Requested format for the text portion of a model response.
Variants§
Text
Unstructured validated text.
Json
Syntactically valid JSON without a schema guarantee.
JsonSchema
JSON constrained by one digest-pinned schema.
Fields
§
schema: SchemaReferenceExact output schema resolved from the trusted local registry.
Implementations§
Source§impl ModelTextOutputFormat
impl ModelTextOutputFormat
Sourcepub const fn json_schema(schema: SchemaReference) -> Self
pub const fn json_schema(schema: SchemaReference) -> Self
Constructs JSON Schema-constrained output.
Sourcepub const fn required_level(&self) -> ModelStructuredOutputLevel
pub const fn required_level(&self) -> ModelStructuredOutputLevel
Returns the corresponding capability requirement level.
Sourcepub const fn schema(&self) -> Option<&SchemaReference>
pub const fn schema(&self) -> Option<&SchemaReference>
Returns the requested JSON Schema identity when applicable.
Trait Implementations§
Source§impl Clone for ModelTextOutputFormat
impl Clone for ModelTextOutputFormat
Source§impl Debug for ModelTextOutputFormat
impl Debug for ModelTextOutputFormat
Source§impl<'de> Deserialize<'de> for ModelTextOutputFormat
impl<'de> Deserialize<'de> for ModelTextOutputFormat
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ModelTextOutputFormat
Source§impl JsonSchema for ModelTextOutputFormat
impl JsonSchema for ModelTextOutputFormat
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for ModelTextOutputFormat
impl PartialEq for ModelTextOutputFormat
Source§impl Serialize for ModelTextOutputFormat
impl Serialize for ModelTextOutputFormat
impl StructuralPartialEq for ModelTextOutputFormat
Auto Trait Implementations§
impl Forget for ModelTextOutputFormat
impl Freeze for ModelTextOutputFormat
impl Move for ModelTextOutputFormat
impl RefUnwindSafe for ModelTextOutputFormat
impl Send for ModelTextOutputFormat
impl Sync for ModelTextOutputFormat
impl Unpin for ModelTextOutputFormat
impl UnsafeUnpin for ModelTextOutputFormat
impl UnwindSafe for ModelTextOutputFormat
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more