discourse-ai/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.rb FEATURE: flexible image handling within messages (#1214) 2025-03-31 12:39:07 -03:00
claude.rb FEATURE: flexible image handling within messages (#1214) 2025-03-31 12:39:07 -03:00
claude_tools.rb DEV: use a proper object for tool definition (#1337) 2025-05-15 17:32:39 +10:00
cohere_tools.rb DEV: use a proper object for tool definition (#1337) 2025-05-15 17:32:39 +10:00
command.rb FEATURE: flexible image handling within messages (#1214) 2025-03-31 12:39:07 -03:00
dialect.rb FEATURE: flexible image handling within messages (#1214) 2025-03-31 12:39:07 -03:00
fake.rb FEATURE: Amazon Nova support via bedrock (#997) 2024-12-06 07:45:58 +11:00
gemini.rb DEV: use a proper object for tool definition (#1337) 2025-05-15 17:32:39 +10:00
mistral.rb FEATURE: Amazon Nova support via bedrock (#997) 2024-12-06 07:45:58 +11:00
nova.rb DEV: Use structured responses for summaries (#1252) 2025-05-06 10:09:39 -03:00
nova_tools.rb DEV: use a proper object for tool definition (#1337) 2025-05-15 17:32:39 +10:00
ollama.rb FEATURE: flexible image handling within messages (#1214) 2025-03-31 12:39:07 -03:00
ollama_tools.rb DEV: use a proper object for tool definition (#1337) 2025-05-15 17:32:39 +10:00
open_ai_compatible.rb FEATURE: flexible image handling within messages (#1214) 2025-03-31 12:39:07 -03:00
open_ai_tools.rb DEV: use a proper object for tool definition (#1337) 2025-05-15 17:32:39 +10:00
xml_tools.rb DEV: use a proper object for tool definition (#1337) 2025-05-15 17:32:39 +10:00