]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
server : add a `/health` endpoint (#4860)
authorBehnam M <redacted>
Wed, 10 Jan 2024 19:56:05 +0000 (14:56 -0500)
committerGitHub <redacted>
Wed, 10 Jan 2024 19:56:05 +0000 (21:56 +0200)
commitcd108e641dbdedd8c5641c4cec1762f751f38136
tree4a0a1576c200d25f6963ff5a8e2ca17022e56246
parent57d016ba2d46a6e22517a31a75cebb48f9e234b6
server : add a `/health` endpoint (#4860)

* added /health endpoint to the server

* added comments on the additional /health endpoint

* Better handling of server state

When the model is being loaded, the server state is `LOADING_MODEL`. If model-loading fails, the server state becomes `ERROR`, otherwise it becomes `READY`. The `/health` endpoint provides more granular messages now according to the server_state value.

* initialized server_state

* fixed a typo

* starting http server before initializing the model

* Update server.cpp

* Update server.cpp

* fixes

* fixes

* fixes

* made ServerState atomic and turned two-line spaces into one-line
examples/server/server.cpp