Skip to main content

AgentStreamExt

Trait AgentStreamExt 

Source
pub trait AgentStreamExt<Output>: Stream<Item = AgentStreamEvent<Output>> + Sized {
    // Provided methods
    fn text_deltas(self) -> TextDeltaStream<Self> { ... }
    fn text_accumulated(self) -> TextDeltaStream<Self> { ... }
    fn outputs(self) -> OutputStream<Self, Output> { ... }
    fn responses(self) -> ResponseStream<Self> { ... }
}
Expand description

Extension trait for creating filtered streams.

Provided Methods§

Source

fn text_deltas(self) -> TextDeltaStream<Self>

Filter to only text delta events.

Source

fn text_accumulated(self) -> TextDeltaStream<Self>

Filter to only text content, accumulating it.

Source

fn outputs(self) -> OutputStream<Self, Output>

Filter to only output events.

Source

fn responses(self) -> ResponseStream<Self>

Filter to only response complete events.

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.

Implementors§

Source§

impl<S, Output> AgentStreamExt<Output> for S
where S: Stream<Item = AgentStreamEvent<Output>>,