strip_thinking_debt

Function strip_thinking_debt 

Source
pub fn strip_thinking_debt(messages: &mut [Value]) -> usize
Expand description

Strip reasoning artifacts from prior assistant messages in messages.

Returns the number of assistant entries that were modified. A return value of 0 means the caller can safely skip any re-serialization step.

See the module docs for the exact rules.