mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
fix web results all getting the same source id when bypassing embedding and retrieval
This commit is contained in:
parent
193a927aba
commit
2729d8aab4
1 changed files with 9 additions and 8 deletions
|
|
@ -395,12 +395,13 @@ async def chat_web_search_handler(
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
elif results.get("docs"):
|
elif results.get("docs"):
|
||||||
|
for doc_idx, doc in enumerate(results["docs"]):
|
||||||
files.append(
|
files.append(
|
||||||
{
|
{
|
||||||
"docs": results.get("docs", []),
|
"docs": [doc],
|
||||||
"name": searchQuery,
|
"name": searchQuery,
|
||||||
"type": "web_search",
|
"type": "web_search",
|
||||||
"urls": results["filenames"],
|
"urls": [results["filenames"][doc_idx]],
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue