From 621c5a391c6494e6069aed56071c4a520d90ee0b Mon Sep 17 00:00:00 2001 From: Wei Zhang Date: Fri, 9 Aug 2024 11:03:59 +0800 Subject: [PATCH] =?UTF-8?q?fix(knowledge=20API):=20Unique=20Constraint=20I?= =?UTF-8?q?ssue=20with=20create=5Fspace=20API=20Cau=E2=80=A6=20(#1794)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: aries_ckt <916701291@qq.com> --- dbgpt/serve/rag/service/service.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dbgpt/serve/rag/service/service.py b/dbgpt/serve/rag/service/service.py index 14e283f2a..f36d3dc4c 100644 --- a/dbgpt/serve/rag/service/service.py +++ b/dbgpt/serve/rag/service/service.py @@ -123,7 +123,10 @@ def create_space(self, request: SpaceServeRequest) -> SpaceServeResponse: Returns: SpaceServeResponse: The response """ - space = self.get(request) + query = { + "name": request.name + } + space = self.get(query) if space is not None: raise HTTPException( status_code=400,