chore: add health check route
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class Health(BaseModel):
|
||||
"""
|
||||
Health check response body
|
||||
"""
|
||||
|
||||
version: str
|
||||
status: str
|
||||
status: str
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
from letta.server.rest_api.routers.v1.agents import router as agents_router
|
||||
from letta.server.rest_api.routers.v1.blocks import router as blocks_router
|
||||
from letta.server.rest_api.routers.v1.health import router as health_router
|
||||
from letta.server.rest_api.routers.v1.jobs import router as jobs_router
|
||||
from letta.server.rest_api.routers.v1.llms import router as llm_router
|
||||
from letta.server.rest_api.routers.v1.sources import router as sources_router
|
||||
from letta.server.rest_api.routers.v1.tools import router as tools_router
|
||||
from letta.server.rest_api.routers.v1.health import router as health_router
|
||||
|
||||
ROUTERS = [
|
||||
tools_router,
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
from typing import TYPE_CHECKING, List, Optional
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from fastapi import APIRouter, Body, Depends, HTTPException, Query
|
||||
from fastapi import APIRouter
|
||||
|
||||
from letta.cli.cli import version
|
||||
from letta.schemas.health import Health
|
||||
from letta.server.rest_api.utils import get_letta_server
|
||||
from letta.server.server import SyncServer
|
||||
|
||||
if TYPE_CHECKING:
|
||||
pass
|
||||
|
||||
router = APIRouter(prefix="/health", tags=["health"])
|
||||
|
||||
|
||||
# Health check
|
||||
@router.get("/", response_model=Health, operation_id="health_check")
|
||||
def health_check():
|
||||
|
||||
Reference in New Issue
Block a user