Spaces:
Runtime error
Runtime error
root and status
Browse files
app.py
CHANGED
@@ -70,6 +70,19 @@ class TTSQuery(BaseModel):
|
|
70 |
|
71 |
|
72 |
# API Endpoints
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
@app.get("/agent")
|
74 |
async def agent(query: ChatQuery):
|
75 |
collection = f"{query.grade}_{query.subject.lower()}_{query.chapter}"
|
|
|
70 |
|
71 |
|
72 |
# API Endpoints
|
73 |
+
@app.get("/")
|
74 |
+
def root():
|
75 |
+
return {
|
76 |
+
"message": "Welcome!",
|
77 |
+
"endpoints": {"status", "query", "agent", "rag", "translate", "tts"},
|
78 |
+
}
|
79 |
+
|
80 |
+
|
81 |
+
@app.get("/status")
|
82 |
+
async def status():
|
83 |
+
return {"status": "200 OK"}
|
84 |
+
|
85 |
+
|
86 |
@app.get("/agent")
|
87 |
async def agent(query: ChatQuery):
|
88 |
collection = f"{query.grade}_{query.subject.lower()}_{query.chapter}"
|