ReAct loop was terminating early when the model returned:
[Agent ran through N steps...]
{"thought": "...", "action": {...}}
The extract_json function only checked the string start or code fences.
Now scans for { or [ at non-word positions and uses depth-counting
to strip trailing text, allowing JSON buried anywhere in the response.
|
||
|---|---|---|
| .. | ||
| chat | ||
| compact | ||
| embed | ||
| perception | ||
| react | ||
| task | ||
| tool | ||
| Cargo.toml | ||
| client.rs | ||
| error.rs | ||
| lib.rs | ||
| tokent.rs | ||