This commit is contained in:
hailin 2025-05-10 00:58:59 +08:00
parent 9fbd81be9c
commit 6f521287c0
1 changed files with 2 additions and 2 deletions

View File

@ -22,8 +22,8 @@ def search_docs(request: QueryRequest, user_id: str = Query(..., description="
try:
logger.info(f"Received search request from user: {user_id} with query: {request.query}")
# 构建索引路径
index_path = os.path.join("index_data", f"{user_id}.index")
# 修正后的索引路径使用用户ID并且不带 ".index" 后缀
index_path = os.path.join("index_data", user_id) # 仅使用 user_id 作为文件夹名
logger.info(f"Looking for index at path: {index_path}")
# 检查索引是否存在