mirror of
https://github.com/ollama/ollama.git
synced 2026-07-04 06:41:39 +00:00
Parser.done() counted the tag's open/close characters ({}, []) without
tracking JSON string context, so a streamed tool call whose string
argument value contained a closing brace or bracket (e.g.
{"code": "if (x) { y }"}) was treated as complete too early and flushed to
the user as plain text instead of being parsed as a tool call.
findArguments() in the same file already tracks string context; apply the
same handling in done() so open/close characters inside string values are
ignored.
|
||
|---|---|---|
| .. | ||
| template.go | ||
| template_test.go | ||
| tools.go | ||
| tools_test.go | ||