From 2decf02c12efbc92cfa960e34c852c09908c7e07 Mon Sep 17 00:00:00 2001 From: slp <296940174@qq.com> Date: Mon, 18 Nov 2024 09:46:03 +0800 Subject: [PATCH] fix(milvus): Fix milvus store search with topk always set to 4 (#2131) --- dbgpt/storage/vector_store/milvus_store.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbgpt/storage/vector_store/milvus_store.py b/dbgpt/storage/vector_store/milvus_store.py index 6b2d89f50..3763f14f8 100644 --- a/dbgpt/storage/vector_store/milvus_store.py +++ b/dbgpt/storage/vector_store/milvus_store.py @@ -458,7 +458,7 @@ def similar_search_with_scores( # convert to milvus expr filter. milvus_filter_expr = self.convert_metadata_filters(filters) if filters else None _, docs_and_scores = self._search( - query=text, topk=topk, expr=milvus_filter_expr + query=text, k=topk, expr=milvus_filter_expr ) if any(score < 0.0 or score > 1.0 for _, score, id in docs_and_scores): logger.warning(