Skip to main content

ApprovalCallback

Trait ApprovalCallback 

Source
pub trait ApprovalCallback: Send + Sync {
    // Required method
    fn approve<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        tool_name: &'life1 str,
        arguments: &'life2 Value,
    ) -> Pin<Box<dyn Future<Output = Result<bool, SynapticError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

A callback that decides whether a tool call should proceed.

Return Ok(true) to approve, Ok(false) to reject (returns an error message to the model), or Err(...) to abort.

Required Methods§

Source

fn approve<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tool_name: &'life1 str, arguments: &'life2 Value, ) -> Pin<Box<dyn Future<Output = Result<bool, SynapticError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Implementors§