This commit is contained in:
parent
e5c83cd11d
commit
746b232514
|
|
@ -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}")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue