From 46bcf98ef27f5d532c5c39fdb9d4f2dbb35fceb9 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Mon, 30 Dec 2024 15:52:07 -0800 Subject: [PATCH] fix: usage stats --- backend/open_webui/utils/response.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/open_webui/utils/response.py b/backend/open_webui/utils/response.py index d429db8aa..d6f7b0ac6 100644 --- a/backend/open_webui/utils/response.py +++ b/backend/open_webui/utils/response.py @@ -29,7 +29,7 @@ async def convert_streaming_response_ollama_to_openai(ollama_streaming_response) ( ( data.get("eval_count", 0) - / ((data.get("eval_duration", 0) / 1_000_000)) + / ((data.get("eval_duration", 0) / 10_000_000)) ) * 100 ), @@ -43,7 +43,7 @@ async def convert_streaming_response_ollama_to_openai(ollama_streaming_response) ( ( data.get("prompt_eval_count", 0) - / ((data.get("prompt_eval_duration", 0) / 1_000_000)) + / ((data.get("prompt_eval_duration", 0) / 10_000_000)) ) * 100 ),