Spaces:
Sleeping
Sleeping
update comment
Browse files- tools/weather.py +1 -1
tools/weather.py
CHANGED
|
@@ -47,7 +47,7 @@ class WeatherTool(Tool):
|
|
| 47 |
if lat is None or lon is None:
|
| 48 |
return f"Error: Latitude or longitude not found for location '{location}'."
|
| 49 |
|
| 50 |
-
# Call the OpenWeatherMap
|
| 51 |
weather_url = f"https://api.openweathermap.org/data/2.5/weather?lat={lat}&lon={lon}&appid={api_key}&units=imperial"
|
| 52 |
weather_response = requests.get(weather_url)
|
| 53 |
weather_data = weather_response.json()
|
|
|
|
| 47 |
if lat is None or lon is None:
|
| 48 |
return f"Error: Latitude or longitude not found for location '{location}'."
|
| 49 |
|
| 50 |
+
# Call the OpenWeatherMap weather API 2.5 endpoint
|
| 51 |
weather_url = f"https://api.openweathermap.org/data/2.5/weather?lat={lat}&lon={lon}&appid={api_key}&units=imperial"
|
| 52 |
weather_response = requests.get(weather_url)
|
| 53 |
weather_data = weather_response.json()
|