mirror of
https://github.com/run-llama/create-llama.git
synced 2026-07-15 05:08:15 -04:00
DuckDuckGo Search Functionality Not Working with Next.js #95
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 @klei30 on GitHub (Nov 15, 2024).
Originally assigned to: @leehuwuj on GitHub.
I'm implementing DuckDuckGo search functionality in my Next.js application using
llamaindex. However, the search feature is not working as expected. Also in the other apps that i have already deployed online the DuckDuckGo search stop working.Below are the details of my implementation and the issues I'm encountering.
Steps to Reproduce
npx create-llama@latest --pro
√ What is your project named? ... newinsuranceagent
√ Which template would you like to use? » Agentic RAG (e.g. chat with docs)
√ Which framework would you like to use? » NextJS
√ Would you like to set up observability? » Traceloop
√ Please provide your OpenAI API key (leave blank to skip): ...
√ Would you like to use a vector database? » Pinecone
√ Which data source would you like to use? » Use an example PDF
√ Would you like to add another data source? » No
√ Would you like to use LlamaParse (improved parser for RAG - requires API key)? ... No / Yes
√ Please provide your LlamaCloud API key (leave blank to skip): ...
√ Would you like to build an agent using tools? If so, select the tools here, otherwise just press enter » DuckDuckGo Search
Actual Behavior
"user: search in internet about last news in BBC
AI: It seems there was an issue with the search. Let me try again to find information about BBC news"
and it keeps loading without showing any other result
@klei30 commented on GitHub (Nov 16, 2024):
DuckDuckGo scraping library (duck-duck-scrape) is detecting anomalies due to frequent requests being made in a short timeframe. it is strange how in all apps i have deployed , which are all of different versions this DuckDuckGo functionality is off
@leehuwuj commented on GitHub (Nov 18, 2024):
@klei30 Yes, I think it's the issue of the DuckDuckGo scrape library. Could you try updating it to the latest version and see if that works?
@marcusschiesser commented on GitHub (Nov 19, 2024):
@KleiAliaj mentioned in #433 that it's also not working for Python
@klei30 commented on GitHub (Nov 19, 2024):
HI @leehuwuj . Again the same issue but with a new one
./node_modules/chokidar/lib/fsevents-handler.js
Module not found: Can't resolve 'fsevents' in 'C:\Users\klei\Desktop\newinsurance\node_modules\chokidar\lib'
and also the duckduckgo issue
Using tool: 'duckduckgo_search' with inputs: 'query: German insurance industry overview, region: de-en, maxResults: 5'
It seems there was an issue with the search request. Let me try again.
@klei30 commented on GitHub (Nov 19, 2024):
by the way i am using node -v v22.11.0 and npm -v 10.9.0.
maybe i need to use another version of this ?
@leehuwuj commented on GitHub (Nov 20, 2024):
Hi @klei30 and @KleiAliaj, we just fixed the issue with the DuckDuckGo tool for the Python template. Unfortunately, the TypeScript version needs more effort because the duck-duck-scrape library hasn't been updated for a year. Please try using another search engine tool if you are using Typescript template in the meantime.
@marcusschiesser commented on GitHub (Nov 20, 2024):
yes, the library is not working at the moment, see https://github.com/Snazzah/duck-duck-scrape/issues/140 - so we will:
@klei30 commented on GitHub (Nov 20, 2024):
I see. But we really need a browser search functionality in the rag. So it would be great if we update it or maybe add another search engine tool.
@marcusschiesser commented on GitHub (Nov 20, 2024):
@klei30 currently you can use the python backend as a workaround. I couldn't find another TS library using duckduckgo that's not outdated. Want to give https://www.npmjs.com/package/@serptech/api a try?