mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #12769] [MERGED] feat: Add Frontend Configuration for RAG_WEB_LOADER_ENGINE
#23014
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/12769
Author: @tth37
Created: 4/12/2025
Status: ✅ Merged
Merged: 4/12/2025
Merged by: @tjbck
Base:
dev← Head:feat_frontend_web_loader📝 Commits (1)
5eac596feat: Add frontend configuration for web loader📊 Changes
3 files changed (+357 additions, -191 deletions)
View changed files
📝
backend/open_webui/config.py(+18 -18)📝
backend/open_webui/routers/retrieval.py(+95 -55)📝
src/lib/components/admin/Settings/WebSearch.svelte(+244 -118)📄 Description
Pull Request Checklist
devbranch.Changelog Entry
Description
Related Discussion: #12744
Currently, users can configure the
RAG_WEB_SEARCH_ENGINE(e.g., DuckDuckGo, Google) directly from the Open WebUI frontend settings. However, the related configuration RAG_WEB_LOADER_ENGINE, which controls the method used to fetch and parse web page content for RAG, appears to only be configurable via environment variables or backend configuration (on latest main branch). This makes it less convenient to switch or experiment with different loading mechanisms compared to the search engine setting.This PR introduces new configuration options in the frontend under Settings -> Web Search allowing users to select the
RAG_WEB_LOADER_ENGINEvia a dropdown menu.To accomodate this and improve structure, the Web Search settings sections has been reorganized both in the backend API schema and the frontend UI.
Key Changes
Backend (
open_webui/routers/retrieval.py,open_webui/config.py)WebConfigPydantic model to have distinctsearchandloadersubsections.RAG_WEB_LOADER_ENGINE,ENABLE_RAG_WEB_LOADER_SSL_VERIFICATION,BYPASS_WEB_SEARCH_EMBEDDING_AND_RETRIEVAL,RAG_WEB_SEARCH_TRUST_ENV, Playwright settings, Firecrawl settings, Tavily loader settings, YouTube loader settings) under the newloadersection.config.pyfor consistency (e.g.,rag.web.loader.playwright_ws_uri, I hope this won't introduce compatibility issues)/configGET and/config/updatePOST endpoints to use the new nested schema.Frontend (
components/admin/Settings/WebSearch.svelte)RAG_WEB_LOADER_ENGINE(options: safe_web, playwright, firecrawl, tavily)tavily_api_keyinput field to serve both the search and loader configurations when Tavily is selected.Bug Fixes
serachapi_api_key->searchapi_api_keyin the response data structure of theupdate_rag_configendpointENABLE_RAG_WEB_LOADER_SSL_VERIFICATION. When the frontend "Bypass SSL verification" switch is toggled ON, the backendenable_ssl_verificationsetting is now correctly updated tofalseupon saving. This behavior was previously commented but not correctly implemented.Additional Information
YOUTUBE_LOADER_TRANSLATIONlies directly inapp.statewhile others were managed withinapp.state.config, I wonder whether it's a bug or special design?Screenshots or Videos
Before:

After:

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.