Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
| 40 |
-
|
| 41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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:
|