Function function_tool

Source
pub fn function_tool<F>(
    name: impl Into<String>,
    description: impl Into<String>,
    func: F,
) -> FunctionTool<F>
where F: Fn(HashMap<String, Value>) -> Result<String> + Send + Sync + 'static,
Expand description

Helper function to create a simple function tool