Commit ·
dbbb9cd
1
Parent(s): c6e5d3f
Add /api/health endpoint alias for HF Spaces
Browse files- backend/app.py +6 -0
backend/app.py
CHANGED
|
@@ -125,6 +125,12 @@ async def health_check():
|
|
| 125 |
}
|
| 126 |
|
| 127 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 128 |
@app.post("/api/chat")
|
| 129 |
async def chat_endpoint(request: ChatRequest):
|
| 130 |
"""
|
|
|
|
| 125 |
}
|
| 126 |
|
| 127 |
|
| 128 |
+
@app.get("/api/health")
|
| 129 |
+
async def api_health_check():
|
| 130 |
+
"""Health check endpoint under /api for HF Spaces compatibility."""
|
| 131 |
+
return await health_check()
|
| 132 |
+
|
| 133 |
+
|
| 134 |
@app.post("/api/chat")
|
| 135 |
async def chat_endpoint(request: ChatRequest):
|
| 136 |
"""
|