ComfortableCobra commited on
Commit
15b59de
·
verified ·
1 Parent(s): aca1913

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -41,6 +41,9 @@ def search_news_of_topic_time(topic: str, time: int) -> str: #it's import to spe
41
  if not filtered_results:
42
  return "No news articles found before the specified time."
43
 
 
 
 
44
  @tool
45
  def get_current_time_in_timezone(timezone: str) -> str:
46
  """A tool that fetches the current local time in a specified timezone.
 
41
  if not filtered_results:
42
  return "No news articles found before the specified time."
43
 
44
+ except Exception as e:
45
+ return f"Error during news search: {str(e)}"
46
+
47
  @tool
48
  def get_current_time_in_timezone(timezone: str) -> str:
49
  """A tool that fetches the current local time in a specified timezone.