GPTResearcher and duckduckgo error: Rate limit. Failed fetching sources. Resulting in empty response.
I am currently working on a freelance project where I need to build a software that integrates GPTResearcher in the pipeline.
I used duckduckgo as the retriever. For few weeks, the code was working fine then I started facing this error : Ratelimit. Failed fetching sources. Resulting in empty response.
Trying to change the code by optimizing the async calls did not solve the issue. I tried using cache, optimizing the calls, adding time.sleep and everything that I could think of.
SOLUTION
The solution is very simple and I actually got pretty upset when I found it. You just need to upgrade the duckduckgo-search package. YES!! After going through stackoverflow and github, where no solution worked, I just upgraded the package to the latest version.
pip install -U duckduckgo_search
I was initially running on duckduckgo_search==6.3.7.
After upgrade, I have duckduckgo_search==7.2.0.