Louis-bou commited on
Commit
54a9697
·
verified ·
1 Parent(s): 36a4323

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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
- return f"An unexpected issue occurred: {str(e)}"
 
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