mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-29 12:34:58 -05:00
[PR #12517] [MERGED] fix: only keep URLs as sources for which the content was actually retrieved #77812
Reference in New Issue
Block a user
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/12517
Author: @Ithanil
Created: 4/6/2025
Status: ✅ Merged
Merged: 4/6/2025
Merged by: @tjbck
Base:
dev← Head:only_keep_retrieved_urls📝 Commits (1)
a506a1aonly keep URLs as sources for which the content could actually be retrieved📊 Changes
1 file changed (+1 additions, -0 deletions)
View changed files
📝
backend/open_webui/routers/retrieval.py(+1 -0)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
When processing web search results, the list of source URLs was inferred just from the web search results. That means if retrieval of any result URL would fail, there was no document for that URL, but the URL was kept in the list. In effect, there was a mismatch between list of documents and list of URLs.
With the present PR, the final list of URLs is inferred from the document metadata (which all loaders in https://github.com/open-webui/open-webui/blob/dev/backend/open_webui/retrieval/web/utils.py set correctly as
metadata = {"source": url}), ensuring a 1:1 match.Fixed
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.