LocalAI/pkg/functions
Ettore Di Giacinto c88074a19e
feat(api): support 'reasoning' api field (#7959)
This PR adds support to support the 'reasoning' API field of the OpenAI
spec.

LocalAI now will extract automatically thinking tags in both SSE and
non-SSE mode. The changes are adapted as well to the Chat UI now that
will use the reasoning field to extract the thinking process and display
it in the chat.

This fixes https://github.com/mudler/LocalAI/issues/7944

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
2026-01-10 19:06:12 +01:00
..
grammars fix: handle multi-type arrays in JSON schema to prevent panic (#6495) 2025-10-17 11:07:37 +02:00
function_structure.go feat(grammar): add llama3.1 schema (#3015) 2024-07-26 20:11:29 +02:00
functions.go chore(refactor): move logging to common package based on slog (#7668) 2025-12-21 19:33:13 +01:00
functions_suite_test.go feat(grammar): add llama3.1 schema (#3015) 2024-07-26 20:11:29 +02:00
functions_test.go feat(functions): parse broken JSON when we parse the raw results, use dynamic rules for grammar keys (#2912) 2024-07-18 17:52:22 +02:00
iterative_parser.go feat(function): Add tool streaming, XML Tool Call Parsing Support (#7865) 2026-01-05 18:25:40 +01:00
json_mode.go refactor: break down json grammar parser in different files (#3004) 2024-07-25 08:41:00 +02:00
json_stack_parser.go feat(function): Add tool streaming, XML Tool Call Parsing Support (#7865) 2026-01-05 18:25:40 +01:00
parse.go feat(function): Add tool streaming, XML Tool Call Parsing Support (#7865) 2026-01-05 18:25:40 +01:00
parse_test.go feat(function): Add tool streaming, XML Tool Call Parsing Support (#7865) 2026-01-05 18:25:40 +01:00
reasoning.go feat(api): support 'reasoning' api field (#7959) 2026-01-10 19:06:12 +01:00
reasoning_test.go feat(api): support 'reasoning' api field (#7959) 2026-01-10 19:06:12 +01:00