Update agent.py
Browse files
agent.py
CHANGED
@@ -111,10 +111,10 @@ Rules:
|
|
111 |
)
|
112 |
|
113 |
# ✅ Async-only with automatic tool execution
|
114 |
-
|
115 |
try:
|
116 |
result = await agent.arun(question)
|
117 |
return result.strip()
|
118 |
except Exception as e:
|
119 |
print("❌ Agent error:", e)
|
120 |
-
return "[ERROR] " + str(e)
|
|
|
111 |
)
|
112 |
|
113 |
# ✅ Async-only with automatic tool execution
|
114 |
+
async def answer_question(question: str) -> str:
|
115 |
try:
|
116 |
result = await agent.arun(question)
|
117 |
return result.strip()
|
118 |
except Exception as e:
|
119 |
print("❌ Agent error:", e)
|
120 |
+
return "[ERROR] " + str(e)
|