This commit is contained in:
parent
13a4c91c7d
commit
d46ff27835
|
|
@ -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="索引构建失败")
|
||||
|
|
|
|||
Loading…
Reference in New Issue