diff --git a/scripts/rag_build_query.py b/scripts/rag_build_query.py index 3a8ae51..4ade395 100644 --- a/scripts/rag_build_query.py +++ b/scripts/rag_build_query.py @@ -173,13 +173,6 @@ def build_user_index(user_id: str): - - - - - - - # 加载 Faiss 索引 faiss_index_file = os.path.join(persist_dir, "index.faiss") faiss_index = faiss.read_index(faiss_index_file) @@ -213,6 +206,13 @@ def build_user_index(user_id: str): logger.error(f"加载索引时发生错误: {e}") raise HTTPException(status_code=500, detail="索引加载失败") + + + + + + + except Exception as e: logger.error(f"索引构建失败: {e}") raise HTTPException(status_code=500, detail="索引构建失败")