pub trait ToolRunnerStream {
// Required method
fn run_with_tools_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: ResponseRequest,
tools: &'life1 ToolRegistry,
cfg: RunConfig,
on_event: &'life2 mut dyn FnMut(Event),
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Streaming variant: forwards Event::TextDelta and Event::ToolCall while running the tool
loop. Inner Event::Completed events from Client::stream are suppressed; a single
Event::Completed is emitted for the final assistant response once the loop finishes.