From 746b232514fe125b5c1ba3f3f0048b5f68a80f71 Mon Sep 17 00:00:00 2001 From: hailin Date: Sat, 10 May 2025 00:25:27 +0800 Subject: [PATCH] . --- scripts/rag_build_query.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/rag_build_query.py b/scripts/rag_build_query.py index 6f62319..ad28430 100644 --- a/scripts/rag_build_query.py +++ b/scripts/rag_build_query.py @@ -30,7 +30,7 @@ def build_user_index(user_id: str): logger.setLevel(logging.INFO) logger.info(f"开始为用户 {user_id} 构建索引...") - + # 确认文档目录是否存在 doc_dir = os.path.join(USER_DOC_PATH, user_id) if not os.path.exists(doc_dir): @@ -58,7 +58,7 @@ def build_user_index(user_id: str): faiss_index = faiss.IndexFlatL2(1024) vector_store = FaissVectorStore(faiss_index=faiss_index) - # 确保索引保存路径存在 + # 确保索引保存路径存在,使用用户 ID 区分索引文件 persist_dir = os.path.join(USER_INDEX_PATH, user_id) logger.info(f"索引保存路径: {persist_dir}")