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§
Sourcefn function_name(&self) -> &str
fn function_name(&self) -> &str
Get the function name from the tool call.
Sourcefn function_arguments(&self) -> &str
fn function_arguments(&self) -> &str
Get the function arguments as a string.
Sourcefn parse_arguments<T: DeserializeOwned>(&self) -> Result<T, Error>
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.