Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/chat/api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from chat.api.assistants.dependencies import get_assistant_service
from chat.api.assistants.router import router as assistants_router
from chat.api.dependencies import get_settings
from chat.api.health.router import router as health_router
from chat.api.messages.router import router as messages_router
from chat.api.runs.router import router as runs_router
from chat.api.threads.router import router as threads_router
Expand Down Expand Up @@ -40,4 +41,5 @@ async def lifespan(app: FastAPI) -> AsyncGenerator[None, None]: # noqa: ARG001
v1_router.include_router(threads_router)
v1_router.include_router(messages_router)
v1_router.include_router(runs_router)
v1_router.include_router(health_router)
app.include_router(v1_router)
Empty file added src/chat/api/health/__init__.py
Empty file.
18 changes: 18 additions & 0 deletions src/chat/api/health/router.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from fastapi import APIRouter, status
from pydantic import BaseModel

router = APIRouter(prefix="/health", tags=["healthcheck"])


class HealthCheck(BaseModel):
status: str = "OK"


@router.get(
"",
summary="Perform a Health Check",
response_description="Return HTTP Status Code 200 (OK)",
status_code=status.HTTP_200_OK,
)
def get_health() -> HealthCheck:
return HealthCheck(status="OK")