From 93866e08d63fe6afac9c375c9a5505255f47ae8c Mon Sep 17 00:00:00 2001 From: ouguoyu Date: Mon, 16 Dec 2024 11:46:33 +0800 Subject: [PATCH] rename __embed__key__ => embed_key --- lazyllm/tools/rag/milvus_store.py | 2 +- tests/basic_tests/test_store.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lazyllm/tools/rag/milvus_store.py b/lazyllm/tools/rag/milvus_store.py index 54c29d30..5a4ab571 100644 --- a/lazyllm/tools/rag/milvus_store.py +++ b/lazyllm/tools/rag/milvus_store.py @@ -100,7 +100,7 @@ def __init__(self, group_embed_keys: Dict[str, Set[str]], embed: Dict[str, Calla field_list.append(pymilvus.FieldSchema(name=field_name, dtype=self._type2milvus[datatype], **field_kwargs)) if isinstance(index_kwargs, list): - embed_key_field_name = "__embed_key__" + embed_key_field_name = "embed_key" for item in index_kwargs: item_key = item.get(embed_key_field_name, None) if not item_key: diff --git a/tests/basic_tests/test_store.py b/tests/basic_tests/test_store.py index 090d344d..865a10be 100644 --- a/tests/basic_tests/test_store.py +++ b/tests/basic_tests/test_store.py @@ -345,12 +345,12 @@ def setUp(self): 'uri': self.store_file, 'index_kwargs': [ { - '__embed_key__': 'vec1', + 'embed_key': 'vec1', 'index_type': 'SPARSE_INVERTED_INDEX', 'metric_type': 'IP', }, { - '__embed_key__': 'vec2', + 'embed_key': 'vec2', 'index_type': 'SPARSE_INVERTED_INDEX', 'metric_type': 'IP', }