module

Autobot::Providers::ToolConverter

Converts OpenAI-style tool definitions to Bedrock Converse toolConfig format.

OpenAI format: {"type": "function", "function": {"name": "x", "description": "y", "parameters": {...}}}

Bedrock format: {"toolSpec": {"name": "x", "description": "y", "inputSchema": {"json": {...}}}}

Class methods

build_tool_config(tools : Array(Hash(String, JSON::Any)) | Nil) : JSON::Any | Nil

Builds the full toolConfig object for the Bedrock request body. Returns nil if tools list is empty.

Source