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§
sourcefn description(&self) -> ToolDescription
fn description(&self) -> ToolDescription
Returns the description of the tool.
sourcefn call(
&self,
function_calls: FunctionCalls
) -> impl Future<Output = Result<FunctionResults, ToolCallError>> + Send
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.