Omnibus commited on
Commit
4118bca
·
verified ·
1 Parent(s): ecf81e8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -322,8 +322,8 @@ def find_all(purpose,task,history, url, result):
322
  print(f'rl:: {rl}')
323
  #for ea in out:
324
  for i in str(out):
325
- #if i == " " or i=="," or i=="\n":
326
- c +=1
327
  print (f'c:: {c}')
328
  if c > MAX_HISTORY:
329
  print("compressing...")
@@ -380,7 +380,7 @@ def run_action(purpose, task, history, action_name, action_input,result):
380
  print(f"RUN: {action_name} ACTION_INPUT: {action_input}")
381
  return NAME_TO_FUNC[action_name](purpose, task, history, action_input, result)
382
  else:
383
- 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"
384
 
385
  return "MAIN", None, history, task, result
386
 
 
322
  print(f'rl:: {rl}')
323
  #for ea in out:
324
  for i in str(out):
325
+ if i == " " or i=="," or i=="\n" or i=="/" or i=="." or i=="<":
326
+ c +=1
327
  print (f'c:: {c}')
328
  if c > MAX_HISTORY:
329
  print("compressing...")
 
380
  print(f"RUN: {action_name} ACTION_INPUT: {action_input}")
381
  return NAME_TO_FUNC[action_name](purpose, task, history, action_input, result)
382
  else:
383
+ history += "observation: The TOOL I tried to use returned an error, I need to select a tool from: (UPDATE-TASK, SEARCH_ENGINE, SCRAPE_WEBSITE, COMPLETE)\n"
384
 
385
  return "MAIN", None, history, task, result
386