Merge pull request #192 from bucolucas/fix/anthropic-tool-structure

Fix: Correct tool data access in Anthropic bot
This commit is contained in:
2025-06-02 15:51:17 -05:00
committed by GitHub
+3 -3
View File
@@ -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
]