diff --git a/dsLightRag/Start.py b/dsLightRag/Start.py index 576c7231..6ce31f51 100644 --- a/dsLightRag/Start.py +++ b/dsLightRag/Start.py @@ -36,6 +36,10 @@ app = FastAPI(lifespan=lifespan) # 挂载静态文件目录 app.mount("/static", StaticFiles(directory="Static"), name="static") +# 访问根的跳转 +@app.get("/") +async def redirect_to_ai(): + return fastapi.responses.RedirectResponse(url="/static/ai.html") @app.post("/api/rag") async def rag(request: fastapi.Request):