Skip to main content

parse_qwen_tool_call_output

Function parse_qwen_tool_call_output 

Source
pub(crate) fn parse_qwen_tool_call_output(
    text: &str,
    contract: &ToolCallOutputContract,
    tolerant: bool,
) -> ParsedToolCallOutput
Expand description

Parse the Qwen XML-like tool-call format. Content before the first marker is retained as ordinary text; a malformed marker region falls back to the whole input, marker included. Tolerant mode recovers complete calls from a truncated or suffixed region.