Available on crate feature
agents only.Expand description
XML-based tool call markup parsing.
Some models (especially smaller ones or those without native function calling) output tool calls using XML-like markup:
<tool_call>
function_name
<arg_key>param1</arg_key>
<arg_value>value1</arg_value>
<arg_key>param2</arg_key>
<arg_value>value2</arg_value>
</tool_call>This module provides utilities to parse such markup into proper Part::FunctionCall.
Functionsยง
- normalize_
content - Normalize content by converting tool call markup in text parts to FunctionCall parts.
- normalize_
option_ content - Normalize
Option<Content>by converting tool call markup.