Update app.py
Browse files
app.py
CHANGED
|
@@ -425,7 +425,7 @@ async def handle_chat(chat_request: ChatRequest, token: str = Cookie(None)):
|
|
| 425 |
History[i].append({"role": "assistant", "content": chat_request.prompt})
|
| 426 |
return {"text": stream.choices[0].message.content,
|
| 427 |
"time": int(stream.timings["prompt_ms"] + stream.timings["predicted_ms"]) - 3,
|
| 428 |
-
"t_per_sec": stream.timings
|
| 429 |
else: return 'Please stop. Just refresh the page.'
|
| 430 |
|
| 431 |
@app.post("/history")
|
|
|
|
| 425 |
History[i].append({"role": "assistant", "content": chat_request.prompt})
|
| 426 |
return {"text": stream.choices[0].message.content,
|
| 427 |
"time": int(stream.timings["prompt_ms"] + stream.timings["predicted_ms"]) - 3,
|
| 428 |
+
"t_per_sec": stream.timings["predicted_per_second"] +0.5}
|
| 429 |
else: return 'Please stop. Just refresh the page.'
|
| 430 |
|
| 431 |
@app.post("/history")
|