Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
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 |
|