pub enum StructuredOutputCapability {
NativeJsonSchema,
NativeFunctionSchema,
GrammarConstrained,
JsonObject,
PromptOnly,
None,
}Expand description
How a model can be made to emit structured output (spec §20.3).
Ordered from strongest to weakest guarantee.
Variants§
NativeJsonSchema
The provider enforces a supplied JSON Schema on the output.
NativeFunctionSchema
The provider enforces the schema of a declared function; the call is used only as a transport for the structured payload, never executed.
GrammarConstrained
Constrained decoding against a grammar derived from the schema.
JsonObject
The provider guarantees syntactically valid JSON but not the schema.
PromptOnly
The schema is only described in the prompt.
None
No structured-output support at all.
Implementations§
Trait Implementations§
Source§impl Clone for StructuredOutputCapability
impl Clone for StructuredOutputCapability
impl Copy for StructuredOutputCapability
Source§impl Debug for StructuredOutputCapability
impl Debug for StructuredOutputCapability
Source§impl<'de> Deserialize<'de> for StructuredOutputCapability
impl<'de> Deserialize<'de> for StructuredOutputCapability
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
Source§impl Display for StructuredOutputCapability
impl Display for StructuredOutputCapability
impl Eq for StructuredOutputCapability
Source§impl Hash for StructuredOutputCapability
impl Hash for StructuredOutputCapability
Source§impl Ord for StructuredOutputCapability
impl Ord for StructuredOutputCapability
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for StructuredOutputCapability
impl PartialOrd for StructuredOutputCapability
impl StructuralPartialEq for StructuredOutputCapability
Auto Trait Implementations§
impl Freeze for StructuredOutputCapability
impl RefUnwindSafe for StructuredOutputCapability
impl Send for StructuredOutputCapability
impl Sync for StructuredOutputCapability
impl Unpin for StructuredOutputCapability
impl UnsafeUnpin for StructuredOutputCapability
impl UnwindSafe for StructuredOutputCapability
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.