Skip to main content

ToolCaller

Type Alias ToolCaller 

Source
pub type ToolCaller = Arc<dyn Fn(String, String, String, SyncSender<ChatEvent>) + Send + Sync + 'static>;
Expand description

Tool executor injected at construction time.

Called with (id, uuid, arguments_json, event_tx) where id is the per-invocation correlation ID to echo back in ChatEvent::ToolCallResult. Spawns a background thread internally and sends ChatEvent::ToolCallResult when done.

Aliased Typeยง

pub struct ToolCaller { /* private fields */ }