From 06c9d9fb457b409ec0aad0cb958de01314366ca2 Mon Sep 17 00:00:00 2001 From: Lily Miller Date: Mon, 6 Oct 2025 16:29:56 -0600 Subject: [PATCH] Fix: Remove incorrect tool_definitions parameter from _query_ollama_with_tools call The method retrieves tool definitions internally, doesn't accept them as a parameter. This was causing TypeError in macha-chat. --- chat.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/chat.py b/chat.py index 43c9974..29f056d 100644 --- a/chat.py +++ b/chat.py @@ -170,13 +170,8 @@ class MachaChatSession: try: # Use tool-aware chat API - this handles all tool calling automatically - response_data = self.agent._query_ollama_with_tools( - messages, - tool_definitions=self.agent.tools.get_tool_definitions() if self.agent.enable_tools else [] - ) - - # Extract the final response - ai_response = response_data.get("content", "") + # Note: tool definitions are retrieved internally by _query_ollama_with_tools + ai_response = self.agent._query_ollama_with_tools(messages) except Exception as e: error_msg = (