Skip to main content

AfterToolCall

Trait AfterToolCall 

Source
pub trait AfterToolCall: Plugin {
    // Required method
    fn on_after_tool_call<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ctx: AfterToolCallContext<'life1>,
    ) -> Pin<Box<dyn Future<Output = AfterToolDecision> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Hook that runs after tool execution, before the result is appended to history. May override the result, flip the error flag, or vote to terminate.

Termination semantics are unanimous across the batch: the run only ends when every finalized tool result in the batch has terminate = true.

Required Methods§

Source

fn on_after_tool_call<'life0, 'life1, 'async_trait>( &'life0 self, ctx: AfterToolCallContext<'life1>, ) -> Pin<Box<dyn Future<Output = AfterToolDecision> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§