pub trait StreamingEventsProvider: ChatCompletionProvider {
type EventStream<'s>: Stream<Item = Result<StreamEvent>> + Send + 's
where Self: 's;
// Required method
fn chat_complete_events_stream<'s, M>(
&'s self,
params: ChatCompleteParameters<M>,
) -> Self::EventStream<'s>
where M: Into<Self::Message> + Clone + Send + Sync + 's;
}Expand description
Provider-agnostic trait for streaming structured events (text + tool-calls).
This complements the existing text-only StreamingChatProvider trait.
Required Associated Types§
type EventStream<'s>: Stream<Item = Result<StreamEvent>> + Send + 's where Self: 's
Required Methods§
fn chat_complete_events_stream<'s, M>( &'s self, params: ChatCompleteParameters<M>, ) -> Self::EventStream<'s>
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.