From 2c59f2dcafe667c0e49587a244d0d0bcf1d149c2 Mon Sep 17 00:00:00 2001 From: Robin Bially Date: Wed, 9 Oct 2024 13:23:04 +0200 Subject: [PATCH] fix critical bug --- backend/open_webui/apps/retrieval/vector/dbs/qdrant.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/open_webui/apps/retrieval/vector/dbs/qdrant.py b/backend/open_webui/apps/retrieval/vector/dbs/qdrant.py index a0e93a843..737693928 100644 --- a/backend/open_webui/apps/retrieval/vector/dbs/qdrant.py +++ b/backend/open_webui/apps/retrieval/vector/dbs/qdrant.py @@ -59,6 +59,8 @@ class QdrantClient: self, collection_name: str, vectors: list[list[float | int]], limit: int ) -> Optional[SearchResult]: # Search for the nearest neighbor items based on the vectors and return 'limit' number of results. + if limit is None: + limit=10000000 # otherwise qdrant would set limit to 10! query_response = self.client.query_points( collection_name=f"{self.collection_prefix}_{collection_name}", @@ -78,6 +80,8 @@ class QdrantClient: if not self.has_collection(collection_name): return None try: + if limit is None: + limit=10000000 # otherwise qdrant would set limit to 10! field_conditions = [] for key, value in filter.items():