Update app.py
Browse files
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.
|