Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -302,11 +302,11 @@ def find_all(purpose,task,history, url):
|
|
302 |
task = "complete?"
|
303 |
return "UPDATE-TASK", None, history, task
|
304 |
else:
|
305 |
-
history = "observation: I need to trigger a search using the following syntax:\naction:
|
306 |
return "UPDATE-TASK", None, history, task
|
307 |
except Exception as e:
|
308 |
print (e)
|
309 |
-
history = "observation: I need to trigger a search using the following syntax:\naction:
|
310 |
return "UPDATE-TASK", None, history, task
|
311 |
|
312 |
#else:
|
@@ -387,7 +387,7 @@ def run_action(purpose, task, history, action_name, action_input):
|
|
387 |
print("RUN: ", action_name, action_input)
|
388 |
return NAME_TO_FUNC[action_name](purpose, task, history, action_input)
|
389 |
else:
|
390 |
-
history += "observation: The TOOL I tried to use returned an error, I need to select a tool from: (UPDATE-TASK,
|
391 |
|
392 |
return "MAIN", None, history, task
|
393 |
|
@@ -396,7 +396,7 @@ def run(purpose,history):
|
|
396 |
history = ""
|
397 |
#if not history:
|
398 |
# history = []
|
399 |
-
action_name = "
|
400 |
action_input = None
|
401 |
while True:
|
402 |
print("")
|
|
|
302 |
task = "complete?"
|
303 |
return "UPDATE-TASK", None, history, task
|
304 |
else:
|
305 |
+
history = "observation: I need to trigger a search using the following syntax:\naction: WEBSITE_SCRAPE action_input=SEARCH_QUERY\n"
|
306 |
return "UPDATE-TASK", None, history, task
|
307 |
except Exception as e:
|
308 |
print (e)
|
309 |
+
history = "observation: I need to trigger a search using the following syntax:\naction: WEBSITE_SCRAPE action_input=SEARCH_QUERY\n"
|
310 |
return "UPDATE-TASK", None, history, task
|
311 |
|
312 |
#else:
|
|
|
387 |
print("RUN: ", action_name, action_input)
|
388 |
return NAME_TO_FUNC[action_name](purpose, task, history, action_input)
|
389 |
else:
|
390 |
+
history += "observation: The TOOL I tried to use returned an error, I need to select a tool from: (UPDATE-TASK, SEARCH_ENGINE, WEBSITE_SCRAPE, COMPLETE)\n"
|
391 |
|
392 |
return "MAIN", None, history, task
|
393 |
|
|
|
396 |
history = ""
|
397 |
#if not history:
|
398 |
# history = []
|
399 |
+
action_name = "SEARCH_ENGINE" if task is None else "MAIN"
|
400 |
action_input = None
|
401 |
while True:
|
402 |
print("")
|