Browse Source

fix: Check collection exists before drop it. (#17692)

Co-authored-by: wlleiiwang <wlleiiwang@tencent.com>
tags/1.3.0
wlleiiwang 6 months ago
parent
commit
f148f1efa2
No account linked to committer's email address
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      api/core/rag/datasource/vdb/tencent/tencent_vector.py

+ 4
- 1
api/core/rag/datasource/vdb/tencent/tencent_vector.py View File

@@ -279,7 +279,10 @@ class TencentVector(BaseVector):
return docs

def delete(self) -> None:
self._client.drop_collection(database_name=self._client_config.database, collection_name=self.collection_name)
if self._has_collection():
self._client.drop_collection(
database_name=self._client_config.database, collection_name=self.collection_name
)


class TencentVectorFactory(AbstractVectorFactory):

Loading…
Cancel
Save