diff --git a/pilot/openapi/api_v1/api_v1.py b/pilot/openapi/api_v1/api_v1.py index becae1ad2..c6bd08ad0 100644 --- a/pilot/openapi/api_v1/api_v1.py +++ b/pilot/openapi/api_v1/api_v1.py @@ -97,7 +97,7 @@ def knowledge_list(): return params -@router.get("/index") +@router.get("/") async def read_main(): return FileResponse(f"{static_file_path}/index.html") diff --git a/pilot/server/dbgpt_server.py b/pilot/server/dbgpt_server.py index d5651c810..9f2c0d5da 100644 --- a/pilot/server/dbgpt_server.py +++ b/pilot/server/dbgpt_server.py @@ -66,7 +66,7 @@ app.add_middleware( ) app.mount("/_next/static", StaticFiles(directory=static_file_path + "/_next/static", html=True)) -app.mount("/", StaticFiles(directory=static_file_path), name="static2") +app.mount("/static", StaticFiles(directory=static_file_path), name="static2") app.include_router(knowledge_router) app.include_router(api_v1)