mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-13 02:24:42 -05:00
Lack of documentation: SearXNG query URL #1096
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 @mdillondc on GitHub (Jun 2, 2024).
I don't see how a full bug report would be warranted here. This is simply lack of documentation.
Help structuring searxng query url
I cannot for the life of me figure out how the
Searxng Query URLshould be structured under "Document Settings - Web Params"I have tried:
Enter a search url to an instance with JSON enabled, e.g.
https://some.searxng.instance/search?q=%&format=jsonandhttps://some.searxng.instance/andhttps://some.searxng.instance/search&format=jsonI expect the
%to be replaced with my actual search query. Instead, the search just searches for the actual percentage sign and comes up with e.g.https://en.wikipedia.org/wiki/Percent_signas a source.@cheahjs commented on GitHub (Jun 2, 2024):
https://docs.openwebui.com/getting-started/env-configuration#searxng_query_url
@mdillondc commented on GitHub (Jun 2, 2024):
I'm an idiot. Sorry.
@Morethanevil commented on GitHub (Jun 2, 2024):
Additional info:
I have setup Searx-NG a long time ago with the standard "settings.yml"
For anyone who gets "403 Forbidden" like me, you need to enable JSON in the settings.yml
@bannert1337 commented on GitHub (Jun 2, 2024):
@Morethanevil this should be added to the documentation! ^^
@remkolems commented on GitHub (Jun 4, 2024):
@mdillondc
Not in the slightest! Very happy that you raised this issue. Could not have solved it time wise concisely. So thank you!
Furthermore:
Workspace->Documents->Document Settings->Web ParamsEnable Web SearchSelect Web Search Enginefrom dropdown menuSearxng Query URLto examples given:https://<search.domain.com>/search?q=<query>orhttp://<searxng.local>/search?q=<query>. Do note the<query>part is mandatory.Furthermore, I had hoped to configure it directly within the docker compose file. For now, I was unable to do so with environment variables. Any suggestions?
@Expro commented on GitHub (Jun 4, 2024):
Indeed, environment variables for enabling Web Search seems to be missing.
@justinh-rahb commented on GitHub (Jun 4, 2024):
These ones? https://docs.openwebui.com/getting-started/env-configuration#web-search
@Expro commented on GitHub (Jun 4, 2024):
Even setting those results in web search being disabled and requiring in-UI intervention.
@justinh-rahb commented on GitHub (Jun 4, 2024):
ENABLE_RAG_WEB_SEARCH=TrueRAG_WEB_SEARCH_ENGINE=searxngThese will be added to the docs shortly.
@alkeryn commented on GitHub (Jun 4, 2024):
I tried to set up but it doesn't seem to be doing anything, how should you trigger web searches ?
@Expro commented on GitHub (Jun 4, 2024):
Click "+" on text field and toggle "Web Search". Documentation is lacking here.
I would love to have that toggle not hidden behind "+".
@alkeryn commented on GitHub (Jun 4, 2024):
@Expro Oh, thank you hahaha
@DustyTurtleDip commented on GitHub (Jun 4, 2024):
Is there a way to enable "Web Search" by default in new conversation ?
@alkeryn commented on GitHub (Jun 4, 2024):
@DustyTurtleDip i don't think so but i'm not even sure you would want that as it's slower.
@Expro after some testing it'd be nice if it used the context to make the query and make one only if it determines that it is necessary.
for example if i ask what the weather is like where i live, it is unable to look up the personal information i gave in "memory" and make a search to look for that town.
it is also unable to use the context to make a subsequent query.
it seems like it's only searching and adding to rag what the user typed in the last message.
it's cool to have barebone search but something more advanced like hugging chat where it uses its context and even tries to crawl the replies would be cool!
as for the memory tab, an edit button would be nifty.
still cool though.
@tjbck commented on GitHub (Jun 4, 2024):
PR to our docs would be greatly appreciated 🙌
https://github.com/open-webui/docs/blob/main/docs/tutorial/web_search.md
@samssausages commented on GitHub (Jun 4, 2024):
Thank you for the info here, especially @Morethanevil adding the info to the searxng config file fixed the issue I was having! Pretty cool that this works with no google API!
@justinh-rahb commented on GitHub (Jun 4, 2024):
Ask and ye shall receive 👍 https://github.com/open-webui/docs/pull/94
@mdillondc commented on GitHub (Jun 4, 2024):
It took me a while to find this as well.
It might add clutter, but I feel that the search button should not be hidden. How about placing it as a greyed-out icon next to the
+icon? The user can then click it to toggle the search on or off with just one click. It is quite cumbersome to click+ > move mouse > click the toggle > refocus the prompt input fieldand then perform the search. If you don't want to search in your next prompt, you have to repeat all the clicks to disable the search. The best solution would be a keybinding to toggle the search, or something like#search search query here.Also, if one enables search and prompts
"Help me find a good carrying harness I can use if my dog gets injured on a hike", the AI could try to rephrase the search query in a way it deems optimal and submit that as the search prompt instead of exactly what the user wrote.Of course, if the program or AI could be smart enough to detect when a search is needed, that would be ideal. However, this is probably optimistic right now, depending on the model in use and several other factors.
@tjbck commented on GitHub (Jun 4, 2024):
Web search toggle button will remain in the
+button where the rest of thetoolsfeature will also be added.@justinh-rahb commented on GitHub (Jun 4, 2024):
It already does so for prompts over 100 characters. It's been proposed to make this a configurable option (with
0meaning always rewrite it).@mdillondc commented on GitHub (Jun 4, 2024):
Understood. But what about a keybinding to quickly toggle?
@alkeryn commented on GitHub (Jun 4, 2024):
@justinh-rahb but does it uses the whole conversation context to generate the search ?
@remkolems commented on GitHub (Jun 5, 2024):
So in summary
docker composefile:or (syntax also possible, but less preferable)
FWIW I'm running a separate dedicated SearXNG docker compose behind a reverse proxy for offloading SSL (hence the use of https internally).
SEARXNG_QUERY_URLwould becomeSEARXNG_QUERY_URL: "https://search.domain.com/search?q=<query>", whereby search.domain.com is self-chosen.A lot of activity for a closed issue ;-)
@justinh-rahb commented on GitHub (Jun 5, 2024):
Resolved: https://docs.openwebui.com/tutorial/web_search#1-searxng-configuration
@JOduMonT commented on GitHub (Jun 6, 2024):
while I do agree that should be the standard, as defined by searx-ng
but my Open-WebUI was able to search the web with my Query URL like this:
http://<searxng.domain.tld>/@justinh-rahb commented on GitHub (Jun 6, 2024):
The
search?q=<query>part was made optional in between docs being written and the eventual merge of the feature. Think I'll leave it in the docs anyway as it feels more proper to me to specify the full path.@janus78 commented on GitHub (Jun 11, 2024):
I have tried all of the proposed changes on my side but still the web search not work, I am using searxng from a docker container and on all my test I receive an alert when I select web search and send the text, the alert indicates an error on line 1 col 1 , I have active the json response on yaml config, tested locally on searxng location and returned json but seems that the search from open webui is not returning json but html from that request and the parse fails, does anyone have the same issue?, thanks.
@remkolems commented on GitHub (Jun 12, 2024):
@janus78
setting.ymlof SearXNG resemble:Web Search?A lot of functions I do not know how to enable or use. The
#use is still a mystery. So learning on the go as well.@remkolems commented on GitHub (Jun 12, 2024):
These are my full docker-compose files.
Do note:
AMD64(hence viadigest@sha256:)Harboras my local on-premise registry. I removed that part from theimage:lines. There could be mistakes made, so be aware.settings.ymlfile ofSearXNGis important. Check and adjust that file accordingly.Two folders:
searxngwith.envanddocker-compose.ymlfilesollamawith.envanddocker-compose.ymlfilesForeach folder on the command-line I execute:
docker compose up -dSearXNG
SearXNGdocker-compose.ymlfile:SearXNG.envfile (adjust accordingly)Ollama
and
Ollamadocker-compose.yml:Ollama.envfile (adjust accordingly):@adriangalilea commented on GitHub (Aug 5, 2024):
Following the docs word by word lead me to
Expecting value: line 1 column 1 (char 0)Note that searxng is working perfectly fine on
localhost:8080Setting up the web search tool available here gives me:
Error during search: 403 Client Error: FORBIDDEN for url: http://searxng:8080/search?q=%3Cquery%3E&q=what+happened+on+the+markets+today&format=json&number_of_results=3I also tried using
http://localhost:8080instead ofhttp://searxng:8080didn't work either.@melihozaydin commented on GitHub (Sep 2, 2024):
Hi,
writing on this as i still have issues with setting searxng up and can't find any docs related to my issue.
I have searxng running on the below config on port 8085 in a container.
Openwebui deployment command
searxng settings
searxng deployment
i can access it via web browser and use it. But Webui gives me below error (in a red popup above screen) when i enable websearch and try to chat.
Also on another note may be useful to not use same port numbers on the example (eg. 8080 on both Openwebui and SEARXNG_QUERY_URL)
as it can be confusing if the internal port or external port should be given to OpenWebUI.
I might be nitpicking tho :/
@Peter-De-Ath commented on GitHub (Sep 2, 2024):
The documentation port is correct
Because you are accessing the searxng container from within the ollama-docker network it should be accessible on port 8080 as the example shows.
Outside of this network it'll be 8085.
@melihozaydin commented on GitHub (Sep 4, 2024):
Thanks that makes sense. But i still get following error when i try to use searxng in webui on port 8080
Searxng Query URL:
http://searxng:8080/search?q=<query>@miguelgargallo commented on GitHub (Sep 8, 2024):
No, you are not, this is no clearly explained well on dev repo .env file

@anonymousmaharaj commented on GitHub (Sep 24, 2024):
Hey! Did you find the solution? I still have this issue.
@melihozaydin commented on GitHub (Sep 25, 2024):
Yes, I dont know why but it works after reducing concurrent request limit to 2 from the default value.