Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -39,7 +39,8 @@ def web_search_DDG(query:str)-> str:
|
|
| 39 |
if not results or "No results found" in results:
|
| 40 |
return f"No answer was found to the request '{query}'. Please reformulate."
|
| 41 |
return f"The answer for the question '{query}' is:\n\n{results}"
|
| 42 |
-
|
|
|
|
| 43 |
|
| 44 |
|
| 45 |
@tool
|
|
|
|
| 39 |
if not results or "No results found" in results:
|
| 40 |
return f"No answer was found to the request '{query}'. Please reformulate."
|
| 41 |
return f"The answer for the question '{query}' is:\n\n{results}"
|
| 42 |
+
except Exception as e:
|
| 43 |
+
return f"An unexpected issue occurred: {str(e)}"
|
| 44 |
|
| 45 |
|
| 46 |
@tool
|