johann22 commited on
Commit
eb25b77
·
1 Parent(s): 51b7880

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -90,7 +90,7 @@ def compress_history(purpose, task, history, directory):
90
  resp = run_gpt(
91
  COMPRESS_HISTORY_PROMPT,
92
  stop_tokens=["observation:", "task:", "action:", "thought:"],
93
- max_tokens=1024,
94
  purpose=purpose,
95
  task=task,
96
  history=history,
@@ -112,6 +112,7 @@ def call_search(purpose, task, history, directory, action_input):
112
  #response = google(search_return)
113
  print(response)
114
  history += "observation: search result is: {}\n".format(response)
 
115
  else:
116
  history += "observation: I need to provide a valid URL to 'action: SEARCH action_input=https://URL'\n"
117
  except Exception as e:
 
90
  resp = run_gpt(
91
  COMPRESS_HISTORY_PROMPT,
92
  stop_tokens=["observation:", "task:", "action:", "thought:"],
93
+ max_tokens=2048,
94
  purpose=purpose,
95
  task=task,
96
  history=history,
 
112
  #response = google(search_return)
113
  print(response)
114
  history += "observation: search result is: {}\n".format(response)
115
+ history = compress_history(purpose, task, history, directory)
116
  else:
117
  history += "observation: I need to provide a valid URL to 'action: SEARCH action_input=https://URL'\n"
118
  except Exception as e: