mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-22 14:13:08 -05:00
[PR #3112] [MERGED] Domain whitelisting for web search results #7986
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/3112
Author: @que-nguyen
Created: 6/13/2024
Status: ✅ Merged
Merged: 6/17/2024
Merged by: @tjbck
Base:
dev← Head:searxng📝 Commits (10+)
7b5f434Implement domain whitelisting for web search resultsa02ba52Merge branch 'dev' into searxng9e4dd4bMerge pull request #3159 from open-webui/dev75e51ecMerge branch 'open-webui:main' into searxnga3ac9eeRefactor main.pyb3d136bRefactored config.pya02139bSet filter_list as optional param in brave.py7d2ad8cSet filter_list as optional param in duckduckgo.pyd8beed1Set filter_list as optional param in google_pse.py3cc0e3eRefactor rag/main.py📊 Changes
10 files changed (+68 additions, -24 deletions)
View changed files
📝
backend/apps/rag/main.py(+9 -1)📝
backend/apps/rag/search/brave.py(+6 -3)📝
backend/apps/rag/search/duckduckgo.py(+5 -4)📝
backend/apps/rag/search/google_pse.py(+5 -3)📝
backend/apps/rag/search/main.py(+11 -1)📝
backend/apps/rag/search/searxng.py(+5 -3)📝
backend/apps/rag/search/serper.py(+5 -3)📝
backend/apps/rag/search/serply.py(+5 -3)📝
backend/apps/rag/search/serpstack.py(+5 -3)📝
backend/config.py(+12 -0)📄 Description
Note: Meta search engines like SearxNG do not support filtering results by domain natively, so this filtering is applied post-search.
Added a filter to restrict search results to specified domains.
Updated the processing of search results to apply the whitelist filter before returning the final results.
Ensured that only results from allowed domains (if specified in the whitelist) are included in the output.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.