diff --git a/backend/open_webui/retrieval/vector/dbs/qdrant.py b/backend/open_webui/retrieval/vector/dbs/qdrant.py index d1b302b34f..9ce432f86e 100644 --- a/backend/open_webui/retrieval/vector/dbs/qdrant.py +++ b/backend/open_webui/retrieval/vector/dbs/qdrant.py @@ -220,7 +220,7 @@ class QdrantClient(VectorDBBase): # Insert the items into the collection, if the collection does not exist, it will be created. self._create_collection_if_not_exists(collection_name, len(items[0]['vector'])) points = self._create_points(items) - self.client.upload_points(f'{self.collection_prefix}_{collection_name}', points) + self.client.upload_points(f'{self.collection_prefix}_{collection_name}', points, wait=True) def upsert(self, collection_name: str, items: list[VectorItem]): # Update the items in the collection, if the items are not present, insert them. If the collection does not exist, it will be created. diff --git a/backend/open_webui/retrieval/vector/dbs/qdrant_multitenancy.py b/backend/open_webui/retrieval/vector/dbs/qdrant_multitenancy.py index 6bf71717e2..bf2968dc99 100644 --- a/backend/open_webui/retrieval/vector/dbs/qdrant_multitenancy.py +++ b/backend/open_webui/retrieval/vector/dbs/qdrant_multitenancy.py @@ -332,7 +332,7 @@ class QdrantClient(VectorDBBase): dimension = len(items[0]['vector']) self._ensure_collection(mt_collection, dimension) points = self._create_points(items, tenant_id) - self.client.upload_points(mt_collection, points) + self.client.upload_points(mt_collection, points, wait=True) return None def insert(self, collection_name: str, items: List[VectorItem]):