pub fn extract<T: DeserializeOwned>(raw: &str) -> Result<T>Expand description
Pull the first valid JSON object of type T out of raw model output.
Handles (in order):
… blocks emitted by reasoning modelsjson ...and...markdown fences- Leading prose before the opening brace
- Trailing text or a second JSON object after the first closes