Add health endpoint to SGLang runtime server (#90)

This commit is contained in:
isaac-vidas authored and GitHub committed 2024-01-23 19:00:28 -08:00
1 parent 7358fa64f7
commit 3de54a1b55
1 file changed
+7 -1
+7 -1
View File
@@ -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 = {