Skip to content

Instantly share code, notes, and snippets.

@RGGH
Created July 17, 2023 18:07
Show Gist options
  • Save RGGH/524871daaa159f82df5bb97e72e28886 to your computer and use it in GitHub Desktop.
Save RGGH/524871daaa159f82df5bb97e72e28886 to your computer and use it in GitHub Desktop.
ddg is deprecated. Use DDGS().text() generator | Duck Duck Go - Generator
from langchain.tools import DuckDuckGoSearchRun
'''
"snippet": result["body"],
"title": result["title"],
"link": result["href"],
'''
from duckduckgo_search import DDGS
ddgs = DDGS()
results = search = DDGS().text("Tesla stock price?")
[result['body'] for result in results]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment