SpaghettiM commited on
Commit
70d0ba9
·
verified ·
1 Parent(s): ebf4e49

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -23,7 +23,10 @@ class BasicAgent:
23
  def __call__(self, question: str) -> str:
24
  print(f"Agent received question (first 50 chars): {question[:50]}...")
25
  fixed_answer = "This is a default answer."
26
- new_answer = self.agent.run(question)
 
 
 
27
  print(f"Agent returning answer: {new_answer}")
28
  return fixed_answer
29
 
 
23
  def __call__(self, question: str) -> str:
24
  print(f"Agent received question (first 50 chars): {question[:50]}...")
25
  fixed_answer = "This is a default answer."
26
+ try:
27
+ new_answer = self.agent.run(question)
28
+ except Exception as e:
29
+ print(e)
30
  print(f"Agent returning answer: {new_answer}")
31
  return fixed_answer
32