Omnibus commited on
Commit
37f5ac2
·
verified ·
1 Parent(s): 4e8674d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -13
app.py CHANGED
@@ -215,21 +215,16 @@ def save_memory(purpose, history):
215
  out+=resp
216
  e=e+chunk
217
  s=s+chunk
218
- '''
219
- resp = run_gpt(
220
- COMPRESS_DATA_PROMPT,
221
- stop_tokens=["observation:", "task:", "action:", "thought:"],
222
- max_tokens=2048,
223
- seed=seed,
224
- purpose=purpose,
225
- task=task,
226
- knowledge=new_history,
227
- history=result,
228
- )
229
- '''
230
  print ("final" + resp)
231
  #history = "result: {}\n".format(resp)
232
- return resp
233
 
234
 
235
 
 
215
  out+=resp
216
  e=e+chunk
217
  s=s+chunk
218
+ resp=resp.strip('</s>')
219
+ lines = resp.strip().strip("\n").split("\n")
220
+ skills=[]
221
+ skill_dict={}
222
+ for i,line in enumerate(lines):
223
+ print(f'Line:: {line}')
224
+ skills.append(resp)
 
 
 
 
 
225
  print ("final" + resp)
226
  #history = "result: {}\n".format(resp)
227
+ return skills
228
 
229
 
230