Update tools.py
Browse files
tools.py
CHANGED
@@ -16,7 +16,7 @@ def simple_search(query: str, max_results: int = 5) -> List[str]:
|
|
16 |
"""
|
17 |
query = tighten(query) # optional heuristic cleaner
|
18 |
with DDGS() as ddgs: # context-manager is the recommended way 🐤
|
19 |
-
raw = list(ddgs.text(query, max_results=max_results)) # DDGS.text() returns list of dicts
|
20 |
out = []
|
21 |
for r in raw:
|
22 |
try:
|
|
|
16 |
"""
|
17 |
query = tighten(query) # optional heuristic cleaner
|
18 |
with DDGS() as ddgs: # context-manager is the recommended way 🐤
|
19 |
+
raw = list(ddgs.text(keywords=query, max_results=max_results)) # DDGS.text() returns list of dicts
|
20 |
out = []
|
21 |
for r in raw:
|
22 |
try:
|