ollama/thinking
Devon Rifkin 2cb0a580f3 thinking: fix double emit when no opening tag
The thinking parser will automatically transition to being a
pass-through if non-whitespace is seen before an opening tag. However,
we weren't clearing the buffer after the first non-whitespace input, so
in practice the first token would be emitted twice.

Added a test that demonstrated this, and then fixed the bug.
2025-08-21 21:03:12 -07:00
..
parser.go thinking: fix double emit when no opening tag 2025-08-21 21:03:12 -07:00
parser_test.go thinking: fix double emit when no opening tag 2025-08-21 21:03:12 -07:00
template.go move thinking logic into its own package (#10990) 2025-06-06 12:02:20 -07:00
template_test.go move thinking logic into its own package (#10990) 2025-06-06 12:02:20 -07:00