Kkanittha commited on
Commit
6c5438c
·
verified ·
1 Parent(s): 0818747

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -36,9 +36,13 @@ class BasicAgent:
36
 
37
  def __call__(self, question: str) -> str:
38
  print(f"Agent received question (first 50 chars): {question[:50]}...")
39
- fixed_answer = self.agent.run(question)
40
- print(f"Agent returning fixed answer: {fixed_answer}")
41
- return fixed_answer
 
 
 
 
42
 
43
 
44
  '''def __call__(self, question: str) -> str:
 
36
 
37
  def __call__(self, question: str) -> str:
38
  print(f"Agent received question (first 50 chars): {question[:50]}...")
39
+ try:
40
+ fixed_answer = self.agent.run(question)
41
+ print(f"Agent returning fixed answer: {fixed_answer}")
42
+ return fixed_answer
43
+ except Exception as e:
44
+ return f"AGENT ERROR: {e}"
45
+
46
 
47
 
48
  '''def __call__(self, question: str) -> str: