From f5d25f3bc67f6eba242b39d0f71c85d4c8289ba3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E6=A2=93=E6=9F=92?= <1787882683@qq.com> Date: Mon, 16 Jun 2025 20:47:59 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=A9=E7=9F=AD=E9=9D=9EDEBUG=E6=83=85?= =?UTF-8?q?=E5=86=B5=E4=B8=8B=E7=9A=84LPMM=E6=97=A5=E5=BF=97=E9=95=BF?= =?UTF-8?q?=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/chat/knowledge/embedding_store.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/chat/knowledge/embedding_store.py b/src/chat/knowledge/embedding_store.py index eba293ce5..1214611ec 100644 --- a/src/chat/knowledge/embedding_store.py +++ b/src/chat/knowledge/embedding_store.py @@ -201,7 +201,8 @@ class EmbeddingStore: """从文件中加载""" if not os.path.exists(self.embedding_file_path): raise Exception(f"文件{self.embedding_file_path}不存在") - logger.info(f"正在从文件{self.embedding_file_path}中加载{self.namespace}嵌入库") + logger.info("正在加载嵌入库...") + logger.debug(f"正在从文件{self.embedding_file_path}中加载{self.namespace}嵌入库") data_frame = pd.read_parquet(self.embedding_file_path, engine="pyarrow") total = len(data_frame) with Progress( @@ -224,13 +225,15 @@ class EmbeddingStore: try: if os.path.exists(self.index_file_path): - logger.info(f"正在从文件{self.index_file_path}中加载{self.namespace}嵌入库的FaissIndex") + logger.info(f"正在加载{self.namespace}嵌入库的FaissIndex...") + logger.debug(f"正在从文件{self.index_file_path}中加载{self.namespace}嵌入库的FaissIndex") self.faiss_index = faiss.read_index(self.index_file_path) logger.info(f"{self.namespace}嵌入库的FaissIndex加载成功") else: raise Exception(f"文件{self.index_file_path}不存在") if os.path.exists(self.idx2hash_file_path): - logger.info(f"正在从文件{self.idx2hash_file_path}中加载{self.namespace}嵌入库的idx2hash映射") + logger.info(f"正在加载{self.namespace}嵌入库的idx2hash映射...") + logger.debug(f"正在从文件{self.idx2hash_file_path}中加载{self.namespace}嵌入库的idx2hash映射") with open(self.idx2hash_file_path, "r") as f: self.idx2hash = json.load(f) logger.info(f"{self.namespace}嵌入库的idx2hash映射加载成功")