pub trait ToolCallParser: Send + Sync {
// Required method
fn parse<'life0, 'life1, 'async_trait>(
&'life0 self,
response: &'life1 str,
) -> Pin<Box<dyn Future<Output = Vec<ToolCall>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Trait for parsing tool calls out of a raw model response.
The default implementation looks for <tool_call>…</tool_call> JSON blocks.
Register custom parsers via CascadeEngine::with_tool_parser.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".