This commit is contained in:
parent
fe66612969
commit
f5c9fc0fdd
|
|
@ -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}")
|
||||
|
||||
# 修正后的索引路径,使用用户ID并且不带 ".index" 后缀
|
||||
index_path = os.path.join("index_data", user_id) # 仅使用 user_id 作为文件夹名
|
||||
# 修正后的索引路径,确保指向具体的 index.faiss 文件
|
||||
index_path = os.path.join("index_data", user_id, "index.faiss") # 指向文件,而非目录
|
||||
logger.info(f"Looking for index at path: {index_path}")
|
||||
|
||||
# 检查索引是否存在
|
||||
|
|
|
|||
Loading…
Reference in New Issue