Spaces:
Sleeping
Sleeping
Delete tools/search.py
Browse files- tools/search.py +0 -10
tools/search.py
DELETED
|
@@ -1,10 +0,0 @@
|
|
| 1 |
-
from duckduckgo_search import DDGS
|
| 2 |
-
|
| 3 |
-
def web_search(query, max_results=3):
|
| 4 |
-
results = []
|
| 5 |
-
with DDGS() as ddgs:
|
| 6 |
-
for r in ddgs.text(query):
|
| 7 |
-
results.append(r["body"])
|
| 8 |
-
if len(results) >= max_results:
|
| 9 |
-
break
|
| 10 |
-
return "\n".join(results)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|