Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -158,7 +158,7 @@ def tool_search_web(query: str, num_results: int = NUM_RESULTS, safesearch: str
|
|
158 |
|
159 |
results = [r for r in ddgs.text(**kwargs)]
|
160 |
if results:
|
161 |
-
return [{"title": r["title"], "snippet": r["body"], "url": r["href"]}
|
162 |
else:
|
163 |
if time_filter and "time" in kwargs:
|
164 |
del kwargs["time"]
|
|
|
158 |
|
159 |
results = [r for r in ddgs.text(**kwargs)]
|
160 |
if results:
|
161 |
+
return [{"title": r["title"], "snippet": r["body"], "url": r["href"]} for r in results]
|
162 |
else:
|
163 |
if time_filter and "time" in kwargs:
|
164 |
del kwargs["time"]
|