Update app.py
Browse files
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(
|
| 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,
|