mirror of
https://git.mirrors.martin98.com/https://github.com/open-webui/open-webui
synced 2025-08-18 10:35:55 +08:00
fix web results all getting the same source id when bypassing embedding and retrieval
This commit is contained in:
parent
193a927aba
commit
2729d8aab4
@ -395,14 +395,15 @@ async def chat_web_search_handler(
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
elif results.get("docs"):
|
elif results.get("docs"):
|
||||||
files.append(
|
for doc_idx, doc in enumerate(results["docs"]):
|
||||||
{
|
files.append(
|
||||||
"docs": results.get("docs", []),
|
{
|
||||||
"name": searchQuery,
|
"docs": [doc],
|
||||||
"type": "web_search",
|
"name": searchQuery,
|
||||||
"urls": results["filenames"],
|
"type": "web_search",
|
||||||
}
|
"urls": [results["filenames"][doc_idx]],
|
||||||
)
|
}
|
||||||
|
)
|
||||||
|
|
||||||
form_data["files"] = files
|
form_data["files"] = files
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user