Kashish commited on
Commit ·
1923da9
1
Parent(s): 6f1e05b
startup re-evaluation
Browse files123445630 unmodified lines3738394142434041424344from __future__ import annotations
from fastapi import FastAPI, HTTPExceptionfrom fastapi.responses import RedirectResponsefrom pydantic import BaseModel, Fieldimport logging
30 unmodified lines
@app.get("/", include_in_schema=False)async def root() -> RedirectResponse: """Redirect root to the Swagger UI so Spaces shows the API docs at '/'.""" return RedirectResponse(url="/docs")async def root() -> dict[str, str]: return {"status": "ready", "message": "FAQ RAG Chatbot is running"}
@app.post("/chat", response_model=ChatResponse)app.py+2-4