ollama/api
Devon Rifkin 77f4594e80 WIP thinking API support
- Allows specifying whether thinking mode should be on or not
- Templates get passed a new option so, e.g., qwen3's template can put
  `/think` or `/no_think` in the system prompt depending on the value of
  the setting
- Add parsing for thinking blocks in both streaming/non-streaming mode
- Update the CLI to make use of these changes

TODO:

- [ ] Don't parse thinking blocks when the user doesn't explicitly set
      the option, to maintain backwards compatibility
- [ ] Warning on CLI when using a non-thinking/older version of a model
      (with an old template)
- [ ] Wire up capabilities fully
- [x] Unify parsing for streaming/non-streaming
- [ ] Update templates
- [ ] Update python/js libraries
- [ ] How to handle differences in models wrt defaults and whether or
      not the thinking ability can even be controlled. If not specified
      by the user, should there be a default or should the template be
      able to check if it was explicitly set?
2025-05-07 16:15:46 -07:00
..
examples docs: improve syntax highlighting in code blocks (#8854) 2025-02-07 09:55:07 -08:00
client.go docs: fix api examples link (#9360) 2025-02-27 10:51:12 -08:00
client_test.go api: document client stream behavior with a test (#8996) 2025-02-20 13:19:58 -08:00
types.go WIP thinking API support 2025-05-07 16:15:46 -07:00
types_test.go types: add any type and validation for ToolFunction enum (#10166) 2025-04-08 15:05:38 -07:00