Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
3de54a1b
Unverified
Commit
3de54a1b
authored
Jan 23, 2024
by
isaac-vidas
Committed by
GitHub
Jan 23, 2024
Browse files
Add health endpoint to SGLang runtime server (#90)
parent
7358fa64
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
python/sglang/srt/server.py
python/sglang/srt/server.py
+7
-1
No files found.
python/sglang/srt/server.py
View file @
3de54a1b
...
...
@@ -17,7 +17,7 @@ import requests
import
uvicorn
import
uvloop
from
fastapi
import
FastAPI
,
Request
from
fastapi.responses
import
StreamingResponse
from
fastapi.responses
import
Response
,
StreamingResponse
from
sglang.backend.runtime_endpoint
import
RuntimeEndpoint
from
sglang.srt.conversation
import
(
Conversation
,
...
...
@@ -57,6 +57,12 @@ tokenizer_manager = None
chat_template_name
=
None
@
app
.
get
(
"/health"
)
async
def
health
()
->
Response
:
"""Health check."""
return
Response
(
status_code
=
200
)
@
app
.
get
(
"/get_model_info"
)
async
def
get_model_info
():
result
=
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment