Skip to content

Commit

Permalink
Added duckduckgo search ability
Browse files Browse the repository at this point in the history
  • Loading branch information
onuratakan committed Apr 8, 2024
1 parent 3c0240a commit 488ef12
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ We are working on Upsonic and the tools that inside the `tools` folder is sendin

- Search
- google
- duckduckgo
- read_website

- System
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ google==3.0.0
beautifulsoup4==4.12.3
requests
python-dotenv==1.0.0
duckduckgo-search==5.3.0
upsonic
10 changes: 10 additions & 0 deletions tiger/tools/search/duckduckgo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from duckduckgo_search import DDGS


def search(query:str, max_number:int=20) -> list:
return [result["href"] for result in DDGS().text(query, max_results=max_number)]


tool_name = "system.duckduckgo"
tool_obj = search
tool_requirements = ["duckduckgo-search==5.3.0"]

0 comments on commit 488ef12

Please sign in to comment.