Spaces:
Running
Running
| from interfaces.middlewares.cors import cors_context | |
| from interfaces.api.user import router as router_user | |
| from interfaces.api.tenant import router as router_tenant | |
| from interfaces.api.file import router as router_file | |
| from interfaces.api.profile import router as router_profile | |
| from interfaces.api.agentic import router as router_agentic | |
| from fastapi import FastAPI | |
| from fastapi.responses import JSONResponse | |
| # ====================== APP ====================== | |
| app = FastAPI( | |
| title="Candidate Explorer Service", | |
| description="Candidate Explorer Service", | |
| docs_url="/docs", | |
| root_path="/CandidateExplorer" | |
| ) | |
| app.add_middleware(**cors_context) | |
| # ====================== ROUTES ====================== | |
| app.include_router(router_tenant) | |
| app.include_router(router_user) | |
| app.include_router(router_file) | |
| app.include_router(router_profile) | |
| app.include_router(router_agentic) | |
| # ====================== HEALTHCHECK & INFO ====================== | |
| def health_ready(): | |
| return JSONResponse(content="Hi, welcome to candidate explorer AI", status_code=200) | |
| def health_ready(): | |
| return JSONResponse(content="Ready", status_code=200) | |
| def health_live(): | |
| return JSONResponse(content="Live", status_code=200) | |
| async def info_endpoint(): | |
| return {"agentId": "candidate-explorer-agent", "status":"Online", "description": "agent candidate explorer!"} | |