This commit is contained in:
parent
344e98a73c
commit
79c176c1d3
|
|
@ -48,7 +48,7 @@ def build_user_index(user_id: str):
|
||||||
)
|
)
|
||||||
|
|
||||||
index_path = os.path.join(USER_INDEX_PATH, f"{user_id}.index")
|
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}")
|
print(f"[BUILD] 为用户 {user_id} 构建并保存了索引 → {index_path}")
|
||||||
|
|
||||||
def query_user_rag(user_id: str, question: str, top_k: int = 4) -> str:
|
def query_user_rag(user_id: str, question: str, top_k: int = 4) -> str:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue