mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #13664] [CLOSED] feat: use single collection for web search results #23259
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/13664
Author: @mMabeck
Created: 5/7/2025
Status: ❌ Closed
Base:
dev← Head:web-search📝 Commits (3)
1e2aa92feat: enhance web search functionality to support multiple queries and improve result handlingdfd5931refac: remove redundant URL deduplication1b23502refac: formatting📊 Changes
2 files changed (+95 additions, -115 deletions)
View changed files
📝
backend/open_webui/routers/retrieval.py(+46 -33)📝
backend/open_webui/utils/middleware.py(+49 -82)📄 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
This pull request refactors the web search functionality to use a single collection for all web search results. This also makes sure each query is only embedded once. Smaller changes include supporting multiple queries, improving concurrency, and simplifying the processing logic. The process/web/search endpoint now accepts a list of queries and runs them concurrently.
Before, each collection was queried, which led to unclear context size. In practice most webpages were given as full context, since it used top K results from each collection/web-page.
Added
SearchFormto accept both single query strings and lists of queries, enabling multi-query support (backend/open_webui/routers/retrieval.py).Changed
process_web_searchto:Improvements to Middleware:
chat_web_search_handlerby:process_web_search.Additional Information
I guess using a Union for the SearchForm model is not ideal, but I would likely break some things/setups if it didn't accept a string.
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.