Update app.py
Browse files
app.py
CHANGED
|
@@ -433,7 +433,7 @@ async def handle_chat(chat_request: ChatRequest, token: str = Cookie(None)):
|
|
| 433 |
model="",
|
| 434 |
messages=History[i],
|
| 435 |
)
|
| 436 |
-
History[i].append({"role": "assistant", "content":
|
| 437 |
return {"text": stream.choices[0].message.content,
|
| 438 |
"time": int((stream.timings["prompt_ms"] + stream.timings["predicted_ms"])/1000 - 3),
|
| 439 |
"t_per_sec": round(stream.timings["predicted_per_second"] + 0.2, 2)}
|
|
|
|
| 433 |
model="",
|
| 434 |
messages=History[i],
|
| 435 |
)
|
| 436 |
+
History[i].append({"role": "assistant", "content": stream.choices[0].message.content})
|
| 437 |
return {"text": stream.choices[0].message.content,
|
| 438 |
"time": int((stream.timings["prompt_ms"] + stream.timings["predicted_ms"])/1000 - 3),
|
| 439 |
"t_per_sec": round(stream.timings["predicted_per_second"] + 0.2, 2)}
|