You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/server/README.md
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -134,10 +134,11 @@ node index.js
134
134
## API Endpoints
135
135
136
136
-**GET**`/health`: Returns the current state of the server:
137
-
-`{"status": "loading model"}` if the model is still being loaded.
138
-
-`{"status": "error"}` if the model failed to load.
139
-
-`{"status": "ok"}` if the model is successfully loaded and the server is ready for further requests mentioned below.
140
-
-`{"status": "no slot available", "slots_idle": 0, "slots_processing": 32}` if no slot are currently available
137
+
- 503 -> `{"status": "loading model"}` if the model is still being loaded.
138
+
- 500 -> `{"status": "error"}` if the model failed to load.
139
+
- 200 -> `{"status": "ok", "slots_idle": 1, "slots_processing": 2 }` if the model is successfully loaded and the server is ready for further requests mentioned below.
140
+
- 200 -> `{"status": "no slot available", "slots_idle": 0, "slots_processing": 32}` if no slot are currently available.
141
+
- 503 -> `{"status": "no slot available", "slots_idle": 0, "slots_processing": 32}` if the query parameter `fail_on_no_slot` is provided and no slot are currently available.
141
142
142
143
-**POST**`/completion`: Given a `prompt`, it returns the predicted completion.
0 commit comments