瀏覽代碼

fix: usage stats

Timothy Jaeryang Baek 4 月之前
父節點
當前提交
46bcf98ef2
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      backend/open_webui/utils/response.py

+ 2 - 2
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
                         ),