Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -40,12 +40,12 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 40 |
@tool
|
| 41 |
def get_news_about_rome_last_25_hours() -> str:
|
| 42 |
"""
|
| 43 |
-
Fetches news articles about Rome from the last
|
| 44 |
No arguments are needed; the API key is hard-coded for demonstration purposes.
|
| 45 |
"""
|
| 46 |
api_key = "3e9552668ced43b8a7c6a9bbfdba8184" # Provided NewsAPI key
|
| 47 |
-
# Calculate the UTC time
|
| 48 |
-
from_date = datetime.datetime.utcnow() - timedelta(hours=
|
| 49 |
from_date_iso = from_date.isoformat("T") + "Z" # Convert to ISO 8601 format
|
| 50 |
|
| 51 |
params = {
|
|
|
|
| 40 |
@tool
|
| 41 |
def get_news_about_rome_last_25_hours() -> str:
|
| 42 |
"""
|
| 43 |
+
Fetches news articles about Rome from the last 30 hours using NewsAPI.
|
| 44 |
No arguments are needed; the API key is hard-coded for demonstration purposes.
|
| 45 |
"""
|
| 46 |
api_key = "3e9552668ced43b8a7c6a9bbfdba8184" # Provided NewsAPI key
|
| 47 |
+
# Calculate the UTC time 30 hours ago
|
| 48 |
+
from_date = datetime.datetime.utcnow() - timedelta(hours=30)
|
| 49 |
from_date_iso = from_date.isoformat("T") + "Z" # Convert to ISO 8601 format
|
| 50 |
|
| 51 |
params = {
|