staedi commited on
Commit
8a88503
·
verified ·
1 Parent(s): 70cc94b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -8
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
- try:
23
- answer = agent.run_async_task(agent.await_result,question)
24
- # return answer
25
- except:
26
- pass
27
- answer = "This is a default answer."
28
-
29
- print(f"Agent returning fixed answer: {answer}")
 
 
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)