Trait clust::messages::Tool

source ·
pub trait Tool {
    // Required methods
    fn description(&self) -> ToolDescription;
    fn call(
        &self,
        function_calls: FunctionCalls
    ) -> Result<FunctionResults, ToolCallError>;
}
Expand description

A tool is a 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 ) -> Result<FunctionResults, ToolCallError>

Calls the tool with the provided function calls.

Implementors§