mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-15 13:55:19 +00:00
Merge pull request #12517 from Ithanil/only_keep_retrieved_urls
fix: only keep URLs as sources for which the content was actually retrieved
This commit is contained in:
commit
635c08a5ab
1 changed files with 1 additions and 0 deletions
|
|
@ -1478,6 +1478,7 @@ async def process_web_search(
|
||||||
trust_env=request.app.state.config.RAG_WEB_SEARCH_TRUST_ENV,
|
trust_env=request.app.state.config.RAG_WEB_SEARCH_TRUST_ENV,
|
||||||
)
|
)
|
||||||
docs = await loader.aload()
|
docs = await loader.aload()
|
||||||
|
urls = [doc.metadata["source"] for doc in docs] # only keep URLs which could be retrieved
|
||||||
|
|
||||||
if request.app.state.config.BYPASS_WEB_SEARCH_EMBEDDING_AND_RETRIEVAL:
|
if request.app.state.config.BYPASS_WEB_SEARCH_EMBEDDING_AND_RETRIEVAL:
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue