]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
docs: document `usage` object in server timings response (#23110)
authorJulien Chaumond <redacted>
Fri, 15 May 2026 17:33:12 +0000 (19:33 +0200)
committerGitHub <redacted>
Fri, 15 May 2026 17:33:12 +0000 (19:33 +0200)
* docs: document `usage` object in server timings response

Co-Authored-By: julien-agent <redacted>
* Apply suggestion from @julien-c

---------

Co-authored-by: julien-agent <redacted>
tools/server/README.md

index 5ba1a58f8c1c3bc34d2ad36e7063958c57fcf893..2b3a2b1687d12cbc3464695b217f3e3e6d80b99f 100644 (file)
@@ -1322,6 +1322,22 @@ This provides information on the performance of the server. It also allows calcu
 
 The total number of tokens in context is equal to `prompt_n + cache_n + predicted_n`
 
+The response also includes a standard `usage` object:
+
+```js
+{
+    // ...
+    "usage": {
+        "completion_tokens": 48,
+        "prompt_tokens": 44,
+        "total_tokens": 92,
+        "prompt_tokens_details": {
+            "cached_tokens": 0
+        }
+    }
+}
+```
+
 *Reasoning support*
 
 The server supports parsing and returning reasoning via the `reasoning_content` field, similar to Deepseek API.