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

Error when searching #92

Open
LanceLake opened this issue Aug 22, 2024 · 11 comments
Open

Error when searching #92

LanceLake opened this issue Aug 22, 2024 · 11 comments

Comments

@LanceLake
Copy link

Describe the bug
When my AI searches, they get this response.

https://imgur.com/zF1YBTt

I did not change any of the base settings that might cause an overload.

My console says this.

https://imgur.com/AYB5lJp

@mamei16
Copy link
Owner

mamei16 commented Aug 23, 2024

Hi, thanks for the report. I have a couple of questions to help narrow down the issue:

  1. Are you using the newest version of LLM_Web_search?
  2. Do you have the newest dependencies installed? (Mainly, what version of duckduckgo-search do you have?)
  3. Lastly, how many searches do you have to trigger for the issue to occur? And over what time frame?

This is a problem that has occurred multiple times in the past with the search back-end (see https://github.com/deedy5/duckduckgo_search/issues?q=is%3Aissue+is%3Aclosed+ratelimit), but has been fixed for a couple of months now.
If you can get it to trigger consistently, please trigger it a couple of times, then update duckduckgo-search by running the following command inside cmd_linux.sh or whatever OS you have:

pip install --upgrade duckduckgo-search

Then see if you can still trigger it.

@LanceLake
Copy link
Author

  1. Yes
  2. Not sure, but I updated, so I presume the latest.
  3. First one. Only one I did.

Updated it via pip. https://imgur.com/fFC4il6

Same error.
https://imgur.com/lqtAsqf

No error on the console though. Just the return from duckduckgo.

@mamei16
Copy link
Owner

mamei16 commented Aug 25, 2024

Are you sure you upgraded duckduckgo-search in the conda environment used by text-generation-webui? If not, try following step 2.i in the installation instructions.
I'm asking because I unfortunately can't reproduce the issue, neither locally nor in the automated unit test that runs every day on GitHub.

@LanceLake
Copy link
Author

Yes. I used 2.i for updating and I also did the manual update to duckduckgo as well.

As for trying the second option there, I don't think I even have conda installed.

image

But yes. I do follow 2i and do the one step update wizard. I update LLM search and I also update the main program.

Perhaps you can tell me where the URL is generated and I can try to juryrig something that may work better?

@mamei16
Copy link
Owner

mamei16 commented Aug 25, 2024

Okay, that should do. If you used the One-click-installer, then you have conda installed, see https://github.com/oobabooga/text-generation-webui/blob/5522584992c632d75d2389e9342793fd1dcc391d/README.md?plain=1#L48.

What do you mean by "where the URL is generated"?

I think it might make sense to create a new issue directly in the duckduckgo_search project, which is the cause of the problem you're experiencing. You can use this minimal script to manually trigger the error for debugging:

import duckduckgo_search

print(f"Running duckduckgo_search version {duckduckgo_search.__version__}\n")
query = "test test 123"

with duckduckgo_search.DDGS() as ddgs:
    instant_answers = ddgs.answers(query)
    if instant_answers:
        print(instant_answers)
    for result in ddgs.text(query, region='wt-wt', safesearch='moderate', timelimit=None, max_results=10):
        print(result["title"])
        print(result["href"])
        print(result["body"])
        print()

@LanceLake
Copy link
Author

Ok. Put in a post there as well. It's not working with any version.

As for where the URL is generated, I mean where you are adding on all the extra things in the URL query fields.

@LanceLake
Copy link
Author

This is what they said..

image

Are you doing the html or lite thing?

@mamei16
Copy link
Owner

mamei16 commented Aug 26, 2024

I'm using the default backend, which is "api". So unless your ISP is blocking duckduckgo, it seems we've come to a dead end :/

@LanceLake

This comment has been minimized.

@mamei16
Copy link
Owner

mamei16 commented Aug 26, 2024

That's a bummer.

If you want, you can try using SearXNG as an alternative search engine instead. It's a so-called meta search engine that aggregates results from several different sources. Everybody can create their own instance and either run in locally or make it public to the internet. Using a public instance of some random person means that searches might be a bit slower than using DuckDuckGo and that whoever is running the instance might log all search queries, including yours.

If you want to try it, simply paste the following URL into the "SearXNG URL" field at the bottom of the LLM Web Search tab: https://etsi.me
This is just some random instance I found that works. You can also try some of the other listed here, but only some of them will work. The ones that don't work will create the error 403 Client Error: Forbidden.

@LanceLake
Copy link
Author

Thank you. I will try that.

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

2 participants