Browse Source

enh: llama cpp timing stats

Timothy Jaeryang Baek 1 month ago
parent
commit
e830b4959e
1 changed files with 4 additions and 0 deletions
  1. 4 0
      backend/open_webui/utils/middleware.py

+ 4 - 0
backend/open_webui/utils/middleware.py

@@ -1964,6 +1964,10 @@ async def process_chat_response(
                                                 }
                                             )
                                         usage = data.get("usage", {})
+                                        usage.update(
+                                            data.get("timing", {})
+                                        )  # llama.cpp
+
                                         if usage:
                                             await event_emitter(
                                                 {