Trait clust::messages::AsyncTool

source ·
pub trait AsyncTool {
    // Required methods
    fn description(&self) -> ToolDescription;
    fn call(
        &self,
        function_calls: FunctionCalls
    ) -> impl Future<Output = Result<FunctionResults, ToolCallError>> + Send;
}
Expand description

A tool is an asynchronous function that can be called by the assistant.

Required Methods§

source

fn description(&self) -> ToolDescription

Returns the description of the tool.

source

fn call( &self, function_calls: FunctionCalls ) -> impl Future<Output = Result<FunctionResults, ToolCallError>> + Send

Asynchronously calls the tool with the provided function calls.

Object Safety§

This trait is not object safe.

Implementors§