]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
server : include usage statistics only when user request them (#16052)
authorRadoslav Gerganov <redacted>
Thu, 18 Sep 2025 10:36:57 +0000 (13:36 +0300)
committerGitHub <redacted>
Thu, 18 Sep 2025 10:36:57 +0000 (10:36 +0000)
commit2b6b55a59f590a1e1eb2dcd09d5b8b6feb9cc748
tree82f1e5758e0a2be8d12d9d2510d99aedf8ee4bfb
parente58174cecbc45bf79bf653cd2c984395940c6ef4
server : include usage statistics only when user request them (#16052)

* server : include usage statistics only when user request them

When serving the OpenAI compatible API, we should check if
{"stream_options": {"include_usage": true} is set in the request when
deciding whether we should send usage statistics

closes: #16048

* add unit test
tools/server/server.cpp
tools/server/tests/unit/test_chat_completion.py