Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

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

wlleiiwangf148f1efa28c
diff --git a/api/core/rag/datasource/vdb/tencent/tencent_vector.py b/api/core/rag/datasource/vdb/tencent/tencent_vector.py
index 540d71bb88e..5ca2b7e5039 100644
--- a/api/core/rag/datasource/vdb/tencent/tencent_vector.py
+++ b/api/core/rag/datasource/vdb/tencent/tencent_vector.py
@@ -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):