diff --git a/ollama_agent.py b/ollama_agent.py index 2ab6577..9396208 100644 --- a/ollama_agent.py +++ b/ollama_agent.py @@ -406,6 +406,7 @@ For other questions, just answer normally without tools.""" print(f"DEBUG: user_content='{user_content}', detected={detected_tool}") if detected_tool: result = self._execute_tool(detected_tool) + print(f"DEBUG: result={result}") # Format result as a clean response response_text = "" @@ -426,6 +427,7 @@ For other questions, just answer normally without tools.""" except Exception as e: response_text = str(result) if not response_text else response_text + print(f"DEBUG: response_text={response_text}") return {"messages": self.messages, "response": response_text} # Loop principale: risposta -> parse tools -> esegui -> ripeti