a9 commited on
Commit
52067ec
·
verified ·
1 Parent(s): 25df4ae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -450,7 +450,7 @@ async def handle_chat(chat_request: ChatRequest, token: str = Cookie(None)):
450
  if j['role']== 'user':
451
  text = text + j['content'] + '<end_of_turn>\n<start_of_turn>model\n'
452
  else : text = text + j['content'] + '<end_of_turn>\n<start_of_turn>user\n'
453
- stream = gen(prompt)
454
  History[i].append({"role": "assistant", "content": stream})
455
  b = time.time()
456
  return {"text": stream.choices[0].message.content,
 
450
  if j['role']== 'user':
451
  text = text + j['content'] + '<end_of_turn>\n<start_of_turn>model\n'
452
  else : text = text + j['content'] + '<end_of_turn>\n<start_of_turn>user\n'
453
+ stream = gen(text)
454
  History[i].append({"role": "assistant", "content": stream})
455
  b = time.time()
456
  return {"text": stream.choices[0].message.content,