Upload main.py
Browse files- app/main.py +15 -1
app/main.py
CHANGED
|
@@ -36,12 +36,26 @@ def root():
|
|
| 36 |
<div style="padding: 2rem; background: white; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); text-align: center;">
|
| 37 |
<h1 style="color: #1a73e8;">RAG Systems as a Service</h1>
|
| 38 |
<p>Enterprise-grade retrieval augmented generation platform.</p>
|
| 39 |
-
<
|
|
|
|
|
|
|
|
|
|
| 40 |
</div>
|
| 41 |
</body>
|
| 42 |
</html>
|
| 43 |
""")
|
| 44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
# Add routers
|
| 46 |
app.include_router(tenants.router, prefix=f"{settings.API_V1_STR}/tenants", tags=["tenants"])
|
| 47 |
app.include_router(sources.router, prefix=f"{settings.API_V1_STR}/sources", tags=["sources"])
|
|
|
|
| 36 |
<div style="padding: 2rem; background: white; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); text-align: center;">
|
| 37 |
<h1 style="color: #1a73e8;">RAG Systems as a Service</h1>
|
| 38 |
<p>Enterprise-grade retrieval augmented generation platform.</p>
|
| 39 |
+
<div style="margin-top: 1rem;">
|
| 40 |
+
<a href="/docs" style="display: inline-block; padding: 0.5rem 1rem; background: #1a73e8; color: white; text-decoration: none; border-radius: 4px;">Explore API Docs</a>
|
| 41 |
+
<a href="/debug/routes" style="display: inline-block; margin-left: 0.5rem; padding: 0.5rem 1rem; border: 1px solid #1a73e8; color: #1a73e8; text-decoration: none; border-radius: 4px;">Debug Routes</a>
|
| 42 |
+
</div>
|
| 43 |
</div>
|
| 44 |
</body>
|
| 45 |
</html>
|
| 46 |
""")
|
| 47 |
|
| 48 |
+
@app.get("/debug/routes")
|
| 49 |
+
def list_routes():
|
| 50 |
+
url_list = []
|
| 51 |
+
for route in app.routes:
|
| 52 |
+
url_list.append({
|
| 53 |
+
"path": route.path,
|
| 54 |
+
"name": route.name,
|
| 55 |
+
"methods": list(route.methods) if hasattr(route, "methods") else None
|
| 56 |
+
})
|
| 57 |
+
return {"total_routes": len(url_list), "routes": url_list}
|
| 58 |
+
|
| 59 |
# Add routers
|
| 60 |
app.include_router(tenants.router, prefix=f"{settings.API_V1_STR}/tenants", tags=["tenants"])
|
| 61 |
app.include_router(sources.router, prefix=f"{settings.API_V1_STR}/sources", tags=["sources"])
|