Omnibus commited on
Commit
104d32f
·
1 Parent(s): 16eb38a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -227,7 +227,8 @@ NAME_TO_FUNC = {
227
  def run_action(purpose, task, history, action_name, action_input):
228
  if action_name == "COMPLETE":
229
  print("Complete - Exiting")
230
- exit(0)
 
231
 
232
  # compress the history when it is long
233
  if len(history.split("\n")) > MAX_HISTORY:
@@ -241,7 +242,7 @@ def run_action(purpose, task, history, action_name, action_input):
241
  print("RUN: ", action_name, action_input)
242
  return NAME_TO_FUNC[action_name](purpose, task, history, action_input)
243
  else:
244
- history += "observation: The TOOL I tried to use returned an error, I need to select a tool from: (UPDATE-TASK, SEARCH, COMPLETE)"
245
 
246
  return "MAIN", None, history, task
247
 
 
227
  def run_action(purpose, task, history, action_name, action_input):
228
  if action_name == "COMPLETE":
229
  print("Complete - Exiting")
230
+ #exit(0)
231
+ return "COMPLETE", None, history, task
232
 
233
  # compress the history when it is long
234
  if len(history.split("\n")) > MAX_HISTORY:
 
242
  print("RUN: ", action_name, action_input)
243
  return NAME_TO_FUNC[action_name](purpose, task, history, action_input)
244
  else:
245
+ history += "observation: The TOOL I tried to use returned an error, I need to select a tool from: (UPDATE-TASK, SEARCH, COMPLETE)\n"
246
 
247
  return "MAIN", None, history, task
248