Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue: websearch (SearX) #3376

Closed
2 of 4 tasks
manfromdownunder opened this issue Jun 22, 2024 · 4 comments
Closed
2 of 4 tasks

issue: websearch (SearX) #3376

manfromdownunder opened this issue Jun 22, 2024 · 4 comments

Comments

@manfromdownunder
Copy link

manfromdownunder commented Jun 22, 2024

Bug Report

Description

Correct URL for SearX instance ( eg, https://metasearx.com/search?q=<query> ) returns error.

  • Confirmed that -json is enabled in the SearX instance

Bug Summary:
Error message:
"Something went wrong :/ Oops! The URL you provided is invalid. Please double-check and try again"

Steps to Reproduce:

  1. Open admin panel, settings, websearch.
  2. Searxng Query URL enter: https://metasearx.com/search?q=<query>
  3. Save settings
  4. Open a new chat and enable websearch
  5. Error returned

You can verify that the json is returned correctly for eg:
https://metasearx.com/search?q=what is the weather? &format=json&pageno=1&safesearch=1&language=en-US&time_range=&categories=&theme=simple&image_proxy=0

You get mixed results when you adjust the URL for example,:
https://metasearx.com/?q=%

There is no error and sites are returned, however they are:
https://www.math.net/percentage
https://en.wikipedia.org/wiki/Percent_sign

Adding in <query> anywhere seems to break the process.

Expected Behavior:
Entering a query with websearch enabled and the websearch searx query url set to https://metasearx.com/search?q=<query>queries the searx instance, returns the JSON and answers the query based on results.

Actual Behavior:
Entering a query with websearch enabled and the websearch searx query url set to https://metasearx.com/search?q=<query> queries the searx instance, returns "Something went wrong :/ Oops! The URL you provided is invalid. Please double-check and try again"

Environment

  • Open WebUI Version: latest

  • Ollama (if applicable): latest

  • Ubuntu 20.04

  • Brave

Reproduction Details

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.

Logs and Screenshots

image

Browser Console Logs:
N/A]

Docker Container Logs:
Not sure how to get these

Screenshots (if applicable):
image

image

Installation Method

  1. git clone project locally
  2. installed docker nvidia container and settings
  3. docker-compose -f docker-compose.yaml up -d

Additional Information

From the testing that I have done, even with my own searx instance (not local) and ensuring that json format is enabled the results come back if I use the url directly in the browser. For some reason open-webui thinks that the json results returned are an error.

There is something funky happening with the way <query> is parsed.

@manfromdownunder manfromdownunder changed the title Websearch (SearX) issue: websearch (SearX) Jun 22, 2024
@tjbck
Copy link
Contributor

tjbck commented Jun 22, 2024

I don't use searxng myself, so if anyone could chime in, I'd greatly appreciate it!

@manfromdownunder if you manage to find out what the culprit is, please keep us updated!

@igeekbb
Copy link

igeekbb commented Jun 23, 2024

searxng

searxng I gave up too. There are issues, it's always unstable to use.

@manfromdownunder
Copy link
Author

manfromdownunder commented Jun 23, 2024

I think I have found the issue and it has nothing to do with the code. There was an incorrect name server defined first in /etc/resolv.conf. I fixed dns resolution and everything appears to be working as expected. The error I was seeing was due to the dns lookup failing first, and then resolving from the second dns server which is why there were wonky results. I also use a lancache server so some websites such as www.accuweather.com which use akamai were resolving to my local lancache IP, throwing up internal IP resolution errors, again making this more confusing.

@justinh-rahb
Copy link
Collaborator

justinh-rahb commented Jun 23, 2024

Thanks for the followup @manfromdownunder 🙏

ad3e17ff0a5a13b9c6f48716e7d35f965ec8137d.jpeg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants