8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b64fa4e commit 28652d2Copy full SHA for 28652d2
llama_cpp/server/app.py
@@ -16,6 +16,7 @@
16
from fastapi.middleware import Middleware
17
from fastapi.middleware.cors import CORSMiddleware
18
from fastapi.security import HTTPBearer
19
+from fastapi_health import health
20
from sse_starlette.sse import EventSourceResponse
21
from starlette_context.plugins import RequestIdPlugin # type: ignore
22
from starlette_context.middleware import RawContextMiddleware
@@ -43,7 +44,11 @@
43
44
from llama_cpp.server.errors import RouteErrorHandler
45
46
47
+def check_health():
48
+ return True
49
+
50
router = APIRouter(route_class=RouteErrorHandler)
51
+router.add_api_route("/health", health([check_health]))
52
53
_server_settings: Optional[ServerSettings] = None
54
0 commit comments