discourse-ai/spec/lib/completions/dialects
Sam 2c6459429f
DEV: use a proper object for tool definition (#1337)
* DEV: use a proper object for tool definition

This moves away from using a loose hash to define tools, which
is error prone.

Instead given a proper object we will also be able to coerce the
return values to match tool definition correctly

* fix xml tools

* fix anthropic tools

* fix specs... a few more to go

* specs are passing

* FIX: coerce values for XML tool calls

* Update spec/lib/completions/tool_definition_spec.rb

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-15 17:32:39 +10:00
..
chat_gpt_spec.rb DEV: use a proper object for tool definition (#1337) 2025-05-15 17:32:39 +10:00
claude_spec.rb FEATURE: Amazon Nova support via bedrock (#997) 2024-12-06 07:45:58 +11:00
dialect_context.rb DEV: use a proper object for tool definition (#1337) 2025-05-15 17:32:39 +10:00
dialect_spec.rb FEATURE: allow specifying tool use none in completion prompt 2025-03-25 08:06:43 +11:00
gemini_spec.rb DEV: use a proper object for tool definition (#1337) 2025-05-15 17:32:39 +10:00
mistral_spec.rb FEATURE: flexible image handling within messages (#1214) 2025-03-31 12:39:07 -03:00
nova_spec.rb DEV: use a proper object for tool definition (#1337) 2025-05-15 17:32:39 +10:00
ollama_spec.rb DEV: use a proper object for tool definition (#1337) 2025-05-15 17:32:39 +10:00
ollama_tools_spec.rb DEV: use a proper object for tool definition (#1337) 2025-05-15 17:32:39 +10:00
open_ai_compatible_spec.rb FEATURE: flexible image handling within messages (#1214) 2025-03-31 12:39:07 -03:00