pub trait ChatModelExt<C, T>: Sized{
// Required method
fn with_structured_output<O>(self) -> StructuredOutputAdapter<O, C, T>
where O: JsonSchema + DeserializeOwned + Send + 'static;
}Expand description
Extension methods on ChatModel that produce typed Runnable
adapters.
model.with_structured_output::<Order>() returns a
Runnable<Vec<Message>, Order> ready for .pipe() composition —
the with_structured_output
ergonomic, typed.
Required Methods§
Sourcefn with_structured_output<O>(self) -> StructuredOutputAdapter<O, C, T>
fn with_structured_output<O>(self) -> StructuredOutputAdapter<O, C, T>
Adapt this ChatModel into a
Runnable<Vec<Message>, O> that routes every invocation
through complete_typed::<O>. The original model is consumed;
operators sharing the model behind an Arc reach for
StructuredOutputAdapter::from_arc directly.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.