Spaces:
Sleeping
Sleeping
Fix except bug
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ def web_search(query:str)-> str:
|
|
16 |
try:
|
17 |
result = DuckDuckGoSearchTool(query)
|
18 |
return result
|
19 |
-
|
20 |
return f"Error searching on internet the query '{query}': {str(e)}"
|
21 |
|
22 |
@tool
|
@@ -28,7 +28,7 @@ def visit_web(url:str)-> str:
|
|
28 |
try:
|
29 |
content = VisitWebpageTool(url)
|
30 |
return content
|
31 |
-
|
32 |
return f"Error fetching page '{url}' content: {str(e)}"
|
33 |
|
34 |
@tool
|
|
|
16 |
try:
|
17 |
result = DuckDuckGoSearchTool(query)
|
18 |
return result
|
19 |
+
except Exception as e:
|
20 |
return f"Error searching on internet the query '{query}': {str(e)}"
|
21 |
|
22 |
@tool
|
|
|
28 |
try:
|
29 |
content = VisitWebpageTool(url)
|
30 |
return content
|
31 |
+
except Exception as e:
|
32 |
return f"Error fetching page '{url}' content: {str(e)}"
|
33 |
|
34 |
@tool
|