Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,14 +19,16 @@ class BasicAgent:
|
|
| 19 |
def __call__(self, question: str) -> str:
|
| 20 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
| 21 |
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
|
|
|
|
|
|
| 30 |
return answer
|
| 31 |
|
| 32 |
# answer = agent.await_result(self.agent,question)
|
|
|
|
| 19 |
def __call__(self, question: str) -> str:
|
| 20 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
| 21 |
|
| 22 |
+
answer = agent.run_async_task(agent.await_result,agent=self.agent,query=question)
|
| 23 |
+
print(f"Agent returning answer: {answer}")
|
| 24 |
+
# try:
|
| 25 |
+
# answer = agent.run_async_task(agent.await_result,question)
|
| 26 |
+
# # return answer
|
| 27 |
+
# except:
|
| 28 |
+
# pass
|
| 29 |
+
# answer = "This is a default answer."
|
| 30 |
+
|
| 31 |
+
# print(f"Agent returning fixed answer: {answer}")
|
| 32 |
return answer
|
| 33 |
|
| 34 |
# answer = agent.await_result(self.agent,question)
|