Skip to main content

extract_reasoning_content

Function extract_reasoning_content 

Source
pub fn extract_reasoning_content(content: &str) -> (Vec<String>, Option<String>)
Expand description

Extract reasoning content from text (for providers that support reasoning)

Supports the following reasoning tag patterns:

Returns (reasoning_parts, cleaned_content) where reasoning_parts contains the extracted reasoning text (without tags) and cleaned_content is the remaining content with reasoning sections removed.