Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -230,13 +230,13 @@ def agent(prompt_in,history,mod=2):
|
|
| 230 |
outph= list(generate(prompt,history,mod,2400,seed,role,in_data))[0]
|
| 231 |
in_data[4]=outph
|
| 232 |
print(outph)
|
| 233 |
-
history
|
| 234 |
yield history
|
| 235 |
role="MANAGER"
|
| 236 |
outp=generate(prompt,history,mod,128,seed,role,in_data)
|
| 237 |
outp0=list(outp)[0].split('<|im_end|>')[0]
|
| 238 |
#outp0 = re.sub('[^a-zA-Z0-9\s.,?!%()]', '', outpp)
|
| 239 |
-
history
|
| 240 |
yield history
|
| 241 |
for line in outp0.split("\n"):
|
| 242 |
if "action:" in line:
|
|
|
|
| 230 |
outph= list(generate(prompt,history,mod,2400,seed,role,in_data))[0]
|
| 231 |
in_data[4]=outph
|
| 232 |
print(outph)
|
| 233 |
+
history.append({'role':'assistant','content':str(outph)})
|
| 234 |
yield history
|
| 235 |
role="MANAGER"
|
| 236 |
outp=generate(prompt,history,mod,128,seed,role,in_data)
|
| 237 |
outp0=list(outp)[0].split('<|im_end|>')[0]
|
| 238 |
#outp0 = re.sub('[^a-zA-Z0-9\s.,?!%()]', '', outpp)
|
| 239 |
+
history.extend([{'role':'assistant','content':str(outp0)}])
|
| 240 |
yield history
|
| 241 |
for line in outp0.split("\n"):
|
| 242 |
if "action:" in line:
|