Skip to main content

strip_tool_call_blocks

Function strip_tool_call_blocks 

Source
pub fn strip_tool_call_blocks(content: &str) -> String
Expand description

Strip <tool_call>...</tool_call> blocks from text, returning remaining content.

Useful for extracting the LLM’s conversational text without the embedded tool invocations. Unclosed <tool_call> tags cause the rest of the text after the tag to be dropped.