Skip to content

Commit eab6795

Browse files
authored
server : add LOG_INFO when model is successfully loaded (#4881)
* 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 * updated `server` readme to document the `/health` endpoint too * used LOG_INFO after successful model loading
1 parent d8d90aa commit eab6795

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

examples/server/server.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2906,6 +2906,7 @@ int main(int argc, char **argv)
29062906
} else {
29072907
llama.initialize();
29082908
state.store(SERVER_STATE_READY);
2909+
LOG_INFO("model loaded", {});
29092910
}
29102911

29112912
// Middleware for API key validation

0 commit comments

Comments
 (0)