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.
This commit is contained in:
9
chat.py
9
chat.py
@@ -170,13 +170,8 @@ class MachaChatSession:
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
# Use tool-aware chat API - this handles all tool calling automatically
|
# Use tool-aware chat API - this handles all tool calling automatically
|
||||||
response_data = self.agent._query_ollama_with_tools(
|
# Note: tool definitions are retrieved internally by _query_ollama_with_tools
|
||||||
messages,
|
ai_response = 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", "")
|
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
error_msg = (
|
error_msg = (
|
||||||
|
|||||||
Reference in New Issue
Block a user