mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-17 08:21:12 -05:00
Feature Request: Add SearxNG Preferences Parameter for Custom Search Engines #4056
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?
Originally created by @rsea2z on GitHub (Feb 22, 2025).
Is your feature request related to a problem? Please describe.
Yes, it is related to a problem for users in China mainland. When using SearxNG with default settings in Open WebUI, the default search engines configured in SearxNG are often inaccessible due to network restrictions in China. This makes the web search feature within Open WebUI unusable for users in this region. I'm frustrated when I try to use web search in Open WebUI in China and it consistently fails due to unavailable search engines.
Describe the solution you'd like
I would like to have a way to pass a
preferencesparameter to the SearxNG URL in Open WebUI. This parameter, obtained from the user's SearxNG cookie settings, allows specifying preferred search engines within SearxNG. By including this parameter in the request, Open WebUI can utilize the user's customized SearxNG settings, ensuring that accessible search engines are used, even in regions with network restrictions.Ideally, the solution would involve adding a new input field in the Open WebUI settings panel, specifically for "SearxNG Preferences Parameter". Users could then copy their
preferencesstring from their SearxNG cookie and paste it into this field. Open WebUI would then automatically append&preferences=[user_provided_preferences]to the SearxNG URL when making search requests.Describe alternatives you've considered
preferencesfrom the URL directly: As shown in my first code snippet, parsing the URL for apreferencesparameter. This is less user-friendly as it requires users to manually modify the query URL every time.The proposed solution of adding a dedicated "SearxNG Preferences Parameter" input field is the most practical and user-centric approach, allowing users to easily customize their SearxNG experience within Open WebUI to overcome network restrictions.
Additional context
Users in China often customize their SearxNG instances to use search engines that are accessible within the country. These custom settings are typically saved in the
preferencescookie in SearxNG. By allowing users to provide theirpreferencesparameter to Open WebUI, we can ensure that the web search feature works effectively for them.The provided code snippets illustrate two potential implementation approaches:
preferencesdirectly from thequery_url.preferencesparameter to thesearch_searxngfunction and a corresponding input field in the UI.I believe the second approach (Dedicated Input Field) is the better solution for user experience. Thank you for considering this feature request.
@rgaricano commented on GitHub (Feb 23, 2025):
another way is throught pipes, e.g. adapting https://openwebui.com/f/atgehrhardt/live_search
defining params of searxng as valves and passing it to searxng function.
@rsea2z commented on GitHub (Feb 23, 2025):
Thanks a lot for your suggestion! Pipes definitely sound like a cool approach, and I checked out the example you linked – it's really insightful!
To be honest though, I'm still hoping for direct support for the
preferencesparameter in Open WebUI itself. Probably easier for everyone to use without having to mess with plugins and stuff.That being said, your pipes idea has actually given me some inspiration, and I might try to whip up a pipe in the next few days, just as a temporary fix and maybe to help move things along for this feature! Anyway, really appreciate your quick reply and the helpful idea! Cheers!
@ivanwong1989 commented on GitHub (Apr 26, 2025):
I would love this as well.