pub trait Provider:
Send
+ Sync
+ 'static {
// Required method
fn stream<'a>(
&'a self,
model: &'a Model,
context: &'a Context,
options: Option<StreamOptions>,
) -> Pin<Box<dyn Future<Output = StreamResult> + Send + 'a>>;
}Expand description
Stable since 0.63.0
Provider trait, streaming options, and provider registry.
LLM provider trait
Implement this trait to add support for new LLM providers.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".