mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-03-15 00:07:28 +00:00
API: Add /v1/health endpoint (#178)
* Add healthcheck - localhost only /healthcheck endpoint - cURL healthcheck in docker compose file * Update Healthcheck Response - change endpoint to /health - remove localhost restriction - add docstring * move healthcheck definition to top of the file - make the healthcheck show up first in the openAPI spec * Tree: Format
This commit is contained in:
@@ -44,6 +44,13 @@ from endpoints.core.utils.model import (
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
# Healthcheck endpoint
|
||||
@router.get("/health")
|
||||
async def healthcheck():
|
||||
"""Get the current service health status"""
|
||||
return {"status": "healthy"}
|
||||
|
||||
|
||||
# Model list endpoint
|
||||
@router.get("/v1/models", dependencies=[Depends(check_api_key)])
|
||||
@router.get("/v1/model/list", dependencies=[Depends(check_api_key)])
|
||||
|
||||
Reference in New Issue
Block a user