Spaces:
Sleeping
Sleeping
fixedd main 2
Browse files
main.py
CHANGED
|
@@ -37,6 +37,14 @@ async def startup_event():
|
|
| 37 |
print(f"❌ Failed to initialize agent: {e}")
|
| 38 |
agent = None
|
| 39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
@app.post("/ask")
|
| 41 |
async def ask_question(request: QueryRequest):
|
| 42 |
"""Send a question and get an answer"""
|
|
|
|
| 37 |
print(f"❌ Failed to initialize agent: {e}")
|
| 38 |
agent = None
|
| 39 |
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
@app.get("/")
|
| 43 |
+
async def root():
|
| 44 |
+
return {"message": "Agentic RAG API is running. Use POST /ask."}
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
|
| 48 |
@app.post("/ask")
|
| 49 |
async def ask_question(request: QueryRequest):
|
| 50 |
"""Send a question and get an answer"""
|