Update app.py
Browse files
app.py
CHANGED
|
@@ -724,9 +724,14 @@ class BasicAgent:
|
|
| 724 |
state = {
|
| 725 |
"messages": question,
|
| 726 |
}
|
| 727 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 728 |
|
| 729 |
-
agent_answer = response["output"]
|
| 730 |
else:
|
| 731 |
agent_answer = fixed_answer
|
| 732 |
# agent_answer = self.agent.run(question)
|
|
|
|
| 724 |
state = {
|
| 725 |
"messages": question,
|
| 726 |
}
|
| 727 |
+
|
| 728 |
+
|
| 729 |
+
try:
|
| 730 |
+
response = self.safe_app.invoke(state)
|
| 731 |
+
agent_answer = response["output"]
|
| 732 |
+
except:
|
| 733 |
+
agent_answer = ""
|
| 734 |
|
|
|
|
| 735 |
else:
|
| 736 |
agent_answer = fixed_answer
|
| 737 |
# agent_answer = self.agent.run(question)
|