StreamingToolExecutor

Trait StreamingToolExecutor 

Source
pub trait StreamingToolExecutor: Send + Sync {
    type Item: Serialize + Send;
    type Error: Error + Send + Sync + 'static;

    // Required method
    fn execute_stream<'a>(
        &'a self,
        ctx: &'a ExecutionContext,
    ) -> Pin<Box<dyn Stream<Item = Result<Self::Item, Self::Error>> + Send + 'a>>;
}
Expand description

Trait for tools that produce streaming output

Required Associated Types§

Source

type Item: Serialize + Send

Source

type Error: Error + Send + Sync + 'static

Required Methods§

Source

fn execute_stream<'a>( &'a self, ctx: &'a ExecutionContext, ) -> Pin<Box<dyn Stream<Item = Result<Self::Item, Self::Error>> + Send + 'a>>

Implementors§