Spaces:
Sleeping
Sleeping
fix the searchtool error
Browse files
app.py
CHANGED
|
@@ -28,9 +28,9 @@ def search_tool(query:str, num_results:int = 3)-> str: #it's import to specify t
|
|
| 28 |
formatted_results = []
|
| 29 |
for i, result in enumerate(results,1):
|
| 30 |
formatted_results.append(
|
| 31 |
-
f"{i}. Title: {result
|
| 32 |
-
f" snippet: {result
|
| 33 |
-
f" URL:{result
|
| 34 |
)
|
| 35 |
|
| 36 |
#combine results into a single string
|
|
|
|
| 28 |
formatted_results = []
|
| 29 |
for i, result in enumerate(results,1):
|
| 30 |
formatted_results.append(
|
| 31 |
+
f"{i}. Title: {result['title']}\n"
|
| 32 |
+
f" snippet: {result['snippet']}\n"
|
| 33 |
+
f" URL:{result['link']}\n"
|
| 34 |
)
|
| 35 |
|
| 36 |
#combine results into a single string
|