mirror of
https://github.com/open-webui/open-webui
synced 2025-06-13 18:02:50 +00:00
refac: remove duplicate urls
This commit is contained in:
parent
b9f55a44b7
commit
b50dcb1862
@ -1601,6 +1601,10 @@ async def process_web_search(
|
||||
doc.metadata.get("source") for doc in docs if doc.metadata.get("source")
|
||||
] # only keep URLs
|
||||
|
||||
# Remove duplicates
|
||||
urls = list(dict.fromkeys(urls))
|
||||
log.debug(f"urls: {urls}")
|
||||
|
||||
if request.app.state.config.BYPASS_WEB_SEARCH_EMBEDDING_AND_RETRIEVAL:
|
||||
return {
|
||||
"status": True,
|
||||
|
Loading…
Reference in New Issue
Block a user