From 5a01fd96c6a8c4bf7e17f360885bb58b4238e1f2 Mon Sep 17 00:00:00 2001 From: cyclop-bot <178948048+cyclop-bot@users.noreply.github.com> Date: Mon, 2 Jun 2025 15:50:49 -0500 Subject: [PATCH] Fix: Adapt Anthropic bot to nested tool function structure --- anthropic_telegram_inference_bot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/anthropic_telegram_inference_bot.py b/anthropic_telegram_inference_bot.py index 3e9ba43..294f860 100644 --- a/anthropic_telegram_inference_bot.py +++ b/anthropic_telegram_inference_bot.py @@ -39,9 +39,9 @@ class AnthropicTelegramInferenceBot(BaseTelegramInferenceBot): if hasattr(self, 'functions') and self.functions: anthropic_tools = [ { - "name": function['name'], - "description": function['description'], - "input_schema": function['parameters'] if function['parameters'] not in [None, {}] else {"type": "object", "properties": {}} + "name": function['function']['name'], + "description": function['function']['description'], + "input_schema": function['function']['parameters'] if function['function']['parameters'] not in [None, {}] else {"type": "object", "properties": {}} } for function in self.functions ]