From 79c176c1d3b505353e204fb3255a36facad6c082 Mon Sep 17 00:00:00 2001 From: hailin Date: Fri, 9 May 2025 22:39:59 +0800 Subject: [PATCH] . --- scripts/rag_build_query.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/rag_build_query.py b/scripts/rag_build_query.py index c311443..4af3de0 100644 --- a/scripts/rag_build_query.py +++ b/scripts/rag_build_query.py @@ -48,7 +48,7 @@ def build_user_index(user_id: str): ) index_path = os.path.join(USER_INDEX_PATH, f"{user_id}.index") - faiss.write_index(vector_store.index, index_path) # ✅ 用传入的 vector_store + faiss.write_index(faiss_index, index_path) # ✅ 改这里,直接写 faiss_index print(f"[BUILD] 为用户 {user_id} 构建并保存了索引 → {index_path}") def query_user_rag(user_id: str, question: str, top_k: int = 4) -> str: