broadfield commited on
Commit
cb7bc09
·
verified ·
1 Parent(s): d280136

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -218,16 +218,18 @@ def agent(prompt_in,history,mod=2):
218
  go=True
219
  MAX_DATA=int(clients[int(mod)]['max_tokens'])*2
220
  while go == True:
 
221
  seed = random.randint(1,9999999999999)
222
  c=0
223
  history = [history[-4:]]
224
  if len(str(history)) > MAX_DATA*4:
225
  history = [history[-2:]]
 
226
  role="PATHMAKER"
227
  outph= list(generate(prompt,history,mod,2400,seed,role,in_data))[0]
228
  in_data[4]=outph
229
  print(outph)
230
- history+[{'role':'assistant','content':str(outph)}]
231
  yield history
232
  role="MANAGER"
233
  outp=generate(prompt,history,mod,128,seed,role,in_data)
 
218
  go=True
219
  MAX_DATA=int(clients[int(mod)]['max_tokens'])*2
220
  while go == True:
221
+
222
  seed = random.randint(1,9999999999999)
223
  c=0
224
  history = [history[-4:]]
225
  if len(str(history)) > MAX_DATA*4:
226
  history = [history[-2:]]
227
+ print('history',history)
228
  role="PATHMAKER"
229
  outph= list(generate(prompt,history,mod,2400,seed,role,in_data))[0]
230
  in_data[4]=outph
231
  print(outph)
232
+ history+=[{'role':'assistant','content':str(outph)}]
233
  yield history
234
  role="MANAGER"
235
  outp=generate(prompt,history,mod,128,seed,role,in_data)