Skip to main content

ToolRuntime

Trait ToolRuntime 

Source
pub trait ToolRuntime<Req, Out>: Approvable<Req> + Sandboxable
where Req: Send + Sync, Out: Send + Sync,
{ // Required method fn run<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 mut self, req: &'life1 Req, attempt: &'life2 SandboxAttempt<'life3>, ctx: &'life4 ToolCtx, ) -> Pin<Box<dyn Future<Output = Result<Out, ToolError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait; }
Expand description

Trait for tool runtimes (from Codex)

A runtime handles the actual execution of a tool request within a sandbox attempt context. Combines Approvable and Sandboxable traits.

Required Methods§

Source

fn run<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 mut self, req: &'life1 Req, attempt: &'life2 SandboxAttempt<'life3>, ctx: &'life4 ToolCtx, ) -> Pin<Box<dyn Future<Output = Result<Out, ToolError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Execute the tool request

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§