|
|
@ -36,6 +36,10 @@ app = FastAPI(lifespan=lifespan)
|
|
|
|
# 挂载静态文件目录
|
|
|
|
# 挂载静态文件目录
|
|
|
|
app.mount("/static", StaticFiles(directory="Static"), name="static")
|
|
|
|
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")
|
|
|
|
@app.post("/api/rag")
|
|
|
|
async def rag(request: fastapi.Request):
|
|
|
|
async def rag(request: fastapi.Request):
|
|
|
|