broadfield commited on
Commit
73b6463
·
verified ·
1 Parent(s): c6ab06c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -148,11 +148,15 @@ def agent(prompt,history,mod,data="None"):
148
  history = [history[-4:]]
149
  if len(str(history)) > MAX_DATA*4:
150
  history = [history[-2:]]
 
 
 
 
151
  role="MANAGER"
152
  outp=generate(prompt,history,mod,128,seed,role,in_data)
153
  outpp=list(outp)[0]
154
  outp0 = re.sub('[^a-zA-Z0-9\s.,?!%()]', '', outpp)
155
- history=history+[{'role':'assistant','content':str(outp0)}]
156
  yield history
157
  for line in outp0.split("\n"):
158
  if "action:" in line:
 
148
  history = [history[-4:]]
149
  if len(str(history)) > MAX_DATA*4:
150
  history = [history[-2:]]
151
+ role="PATHMAKER"
152
+ outph= list(generate(prompt,history,mod,2400,seed,role,in_data))[0]
153
+ history+[{'role':'assistant','content':str(outph)}]
154
+ yield history
155
  role="MANAGER"
156
  outp=generate(prompt,history,mod,128,seed,role,in_data)
157
  outpp=list(outp)[0]
158
  outp0 = re.sub('[^a-zA-Z0-9\s.,?!%()]', '', outpp)
159
+ history+[{'role':'assistant','content':str(outp0)}]
160
  yield history
161
  for line in outp0.split("\n"):
162
  if "action:" in line: