Spaces:
Runtime error
Runtime error
MohitGupta41 commited on
Commit ·
e010bf4
1
Parent(s): bc5bc44
Initial Commit
Browse files- Src/api/fastapi_app.py +14 -3
Src/api/fastapi_app.py
CHANGED
|
@@ -16,7 +16,7 @@ from ..rag.rag_pipeline import rag_query_multimodal
|
|
| 16 |
from ..agent.orchestrator import orchestrate_query
|
| 17 |
from ..agent.agent_executor import get_agent_executor
|
| 18 |
|
| 19 |
-
app = FastAPI()
|
| 20 |
|
| 21 |
# ----------------------------
|
| 22 |
# On Startup: DB Init + Seed
|
|
@@ -26,9 +26,20 @@ def startup_event():
|
|
| 26 |
init_db()
|
| 27 |
seed_data()
|
| 28 |
|
| 29 |
-
@app.get("/")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
def read_root():
|
| 31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
# ----------------------------
|
| 34 |
# 1. Medical RAG Chatbot
|
|
|
|
| 16 |
from ..agent.orchestrator import orchestrate_query
|
| 17 |
from ..agent.agent_executor import get_agent_executor
|
| 18 |
|
| 19 |
+
app = FastAPI(title="Medical Agentic Bot Backend FastAPI", version="1.0.0")
|
| 20 |
|
| 21 |
# ----------------------------
|
| 22 |
# On Startup: DB Init + Seed
|
|
|
|
| 26 |
init_db()
|
| 27 |
seed_data()
|
| 28 |
|
| 29 |
+
# @app.get("/")
|
| 30 |
+
# def read_root():
|
| 31 |
+
# return {"Hello": "World!"}
|
| 32 |
+
class Message(BaseModel):
|
| 33 |
+
message: str
|
| 34 |
+
|
| 35 |
+
@app.get("/", response_model=Message, summary="Root Endpoint", tags=["Root"])
|
| 36 |
def read_root():
|
| 37 |
+
"""
|
| 38 |
+
Root endpoint for checking the API status.
|
| 39 |
+
|
| 40 |
+
Returns a welcome message.
|
| 41 |
+
"""
|
| 42 |
+
return {"message": "Welcome to My Awesome API!"}
|
| 43 |
|
| 44 |
# ----------------------------
|
| 45 |
# 1. Medical RAG Chatbot
|