From c689a63a73af0ef1b67175cd90d94a350f8ae103 Mon Sep 17 00:00:00 2001 From: yhjun1026 <460342015@qq.com> Date: Tue, 1 Aug 2023 19:45:15 +0800 Subject: [PATCH] feat(editor):editor api --- README.md | 4 ++-- pilot/openapi/api_v1/editor/api_editor_v1.py | 2 +- pilot/server/dbgpt_server.py | 8 +++++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 690379489..d0e5e142f 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Open Issues - Discord + Discord Open in GitHub Codespaces @@ -167,7 +167,7 @@ The MIT License (MIT) ## Contact Information We are working on building a community, if you have any ideas about building the community, feel free to contact us. -[![](https://dcbadge.vercel.app/api/server/jDD5FwHh?compact=true&style=flat)](https://discord.gg/eZHE94MN) +[![](https://dcbadge.vercel.app/api/server/eZHE94MN?compact=true&style=flat)](https://discord.gg/eZHE94MN)

diff --git a/pilot/openapi/api_v1/editor/api_editor_v1.py b/pilot/openapi/api_v1/editor/api_editor_v1.py index 4d306f446..2fd287766 100644 --- a/pilot/openapi/api_v1/editor/api_editor_v1.py +++ b/pilot/openapi/api_v1/editor/api_editor_v1.py @@ -55,7 +55,7 @@ async def get_editor_sql_rounds(con_uid: str): return Result.succ(None) -@router.post("/v1/editor/chart", response_model=Result[ChartDetail]) +@router.get("/v1/editor/chart", response_model=Result[ChartDetail]) async def get_editor_chart(con_uid: str, chart_uid: str): return Result.succ(None) diff --git a/pilot/server/dbgpt_server.py b/pilot/server/dbgpt_server.py index 13850407a..f48c7cd50 100644 --- a/pilot/server/dbgpt_server.py +++ b/pilot/server/dbgpt_server.py @@ -30,7 +30,7 @@ from pilot.server.knowledge.api import router as knowledge_router from pilot.openapi.api_v1.api_v1 import router as api_v1, validation_exception_handler - +from pilot.openapi.api_v1.editor.api_editor_v1 import router as api_editor_route_v1 logging.basicConfig(level=logging.INFO) @@ -70,11 +70,13 @@ app.add_middleware( ) -app.include_router(api_v1, prefix="/api") -app.include_router(knowledge_router, prefix="/api") +# app.include_router(api_v1, prefix="/api") +# app.include_router(knowledge_router, prefix="/api") +# app.include_router(api_editor_route_v1, prefix="/api") app.include_router(api_v1) app.include_router(knowledge_router) +app.include_router(api_editor_route_v1) app.mount("/_next/static", StaticFiles(directory=static_file_path + "/_next/static")) app.mount("/", StaticFiles(directory=static_file_path, html=True), name="static")