ToolCallExt

Trait ToolCallExt 

Source
pub trait ToolCallExt {
    // Required methods
    fn id(&self) -> &str;
    fn function_name(&self) -> &str;
    fn function_arguments(&self) -> &str;
    fn parse_arguments<T: DeserializeOwned>(&self) -> Result<T, Error>;
}
Expand description

Extension trait for tool calls.

Required Methods§

Source

fn id(&self) -> &str

Get the tool call ID.

Source

fn function_name(&self) -> &str

Get the function name from the tool call.

Source

fn function_arguments(&self) -> &str

Get the function arguments as a string.

Source

fn parse_arguments<T: DeserializeOwned>(&self) -> Result<T, Error>

Parse the function arguments as JSON.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§