Skip to main content

ToolDynStreaming

Trait ToolDynStreaming 

Source
pub trait ToolDynStreaming:
    Send
    + Sync
    + 'static
    + ToolDyn {
    // Required method
    fn call_streaming<'a>(
        &'a self,
        input: Value,
        on_chunk: Box<dyn Fn(&str) + Send + Sync + 'a>,
    ) -> Pin<Box<dyn Future<Output = Result<(), ToolError>> + Send + 'a>>;
}
Expand description

Optional streaming interface for tools.

Required Methods§

Source

fn call_streaming<'a>( &'a self, input: Value, on_chunk: Box<dyn Fn(&str) + Send + Sync + 'a>, ) -> Pin<Box<dyn Future<Output = Result<(), ToolError>> + Send + 'a>>

Execute the tool with streaming chunk updates.

Implementors§