Omnibus commited on
Commit
af9c428
·
verified ·
1 Parent(s): 8e10ba2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -143,9 +143,9 @@ def run_gpt(
143
 
144
 
145
  #formatted_prompt = format_prompt(f"{system_prompt}, {prompt}", history)
146
- #formatted_prompt = format_prompt(f'{content}', history)
147
 
148
- stream = client.text_generation(content, **generate_kwargs, stream=True, details=True, return_full_text=False)
149
  resp = ""
150
  for response in stream:
151
  resp += response.token.text
@@ -229,7 +229,7 @@ def compress_history(purpose, task, history):
229
  def call_main(purpose, task, history, action_input):
230
  resp = run_gpt(
231
  FINDER,
232
- stop_tokens=["observation:", "task:"],
233
  max_tokens=512,
234
  seed=random.randint(1,1000000000),
235
  purpose=purpose,
@@ -251,8 +251,8 @@ def call_main(purpose, task, history, action_input):
251
  history += "{}\n".format(line)
252
  return action_name, action_input, history, task
253
  else:
254
-
255
- history += "{}\n".format(line)
256
  #assert False, "unknown action: {}".format(line)
257
  #return "UPDATE-TASK", None, history, task
258
  if "VERBOSE":
 
143
 
144
 
145
  #formatted_prompt = format_prompt(f"{system_prompt}, {prompt}", history)
146
+ formatted_prompt = format_prompt(f'{content}', history)
147
 
148
+ stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
149
  resp = ""
150
  for response in stream:
151
  resp += response.token.text
 
229
  def call_main(purpose, task, history, action_input):
230
  resp = run_gpt(
231
  FINDER,
232
+ stop_tokens=["observation:", "task:","action:"],
233
  max_tokens=512,
234
  seed=random.randint(1,1000000000),
235
  purpose=purpose,
 
251
  history += "{}\n".format(line)
252
  return action_name, action_input, history, task
253
  else:
254
+ pass
255
+ #history += "{}\n".format(line)
256
  #assert False, "unknown action: {}".format(line)
257
  #return "UPDATE-TASK", None, history, task
258
  if "VERBOSE":