Unverified Commit 3de54a1b authored by isaac-vidas's avatar isaac-vidas Committed by GitHub
Browse files

Add health endpoint to SGLang runtime server (#90)

parent 7358fa64
...@@ -17,7 +17,7 @@ import requests ...@@ -17,7 +17,7 @@ import requests
import uvicorn import uvicorn
import uvloop import uvloop
from fastapi import FastAPI, Request 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.backend.runtime_endpoint import RuntimeEndpoint
from sglang.srt.conversation import ( from sglang.srt.conversation import (
Conversation, Conversation,
...@@ -57,6 +57,12 @@ tokenizer_manager = None ...@@ -57,6 +57,12 @@ tokenizer_manager = None
chat_template_name = None chat_template_name = None
@app.get("/health")
async def health() -> Response:
"""Health check."""
return Response(status_code=200)
@app.get("/get_model_info") @app.get("/get_model_info")
async def get_model_info(): async def get_model_info():
result = { result = {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment