Spaces:
Runtime error
Runtime error
Commit
·
6797e2d
1
Parent(s):
f550527
correct defect in retry when no agent
Browse files
app.py
CHANGED
|
@@ -1396,7 +1396,10 @@ def retry(history3):
|
|
| 1396 |
yield history3
|
| 1397 |
|
| 1398 |
try:
|
| 1399 |
-
|
|
|
|
|
|
|
|
|
|
| 1400 |
time.sleep(0.1)
|
| 1401 |
history3 = history3 + [(None, response)]
|
| 1402 |
print ("response of chatbot:", response)
|
|
@@ -1414,7 +1417,7 @@ def retry(history3):
|
|
| 1414 |
print("No need to add file in chatbot")
|
| 1415 |
|
| 1416 |
except Exception as e:
|
| 1417 |
-
print("
|
| 1418 |
# yield chathmi3(last_request, chatbot_history)
|
| 1419 |
|
| 1420 |
def display_input(message, history2):
|
|
|
|
| 1396 |
yield history3
|
| 1397 |
|
| 1398 |
try:
|
| 1399 |
+
if agent is not None:
|
| 1400 |
+
response = agent.run(message)
|
| 1401 |
+
elif agent is None:
|
| 1402 |
+
response = asyncio.run(start_playwright(message))
|
| 1403 |
time.sleep(0.1)
|
| 1404 |
history3 = history3 + [(None, response)]
|
| 1405 |
print ("response of chatbot:", response)
|
|
|
|
| 1417 |
print("No need to add file in chatbot")
|
| 1418 |
|
| 1419 |
except Exception as e:
|
| 1420 |
+
print("Retry error:", e)
|
| 1421 |
# yield chathmi3(last_request, chatbot_history)
|
| 1422 |
|
| 1423 |
def display_input(message, history2):
|