Spaces:
Sleeping
Sleeping
Update app.py
Browse filesFix error message for get_weather tool
app.py
CHANGED
|
@@ -42,7 +42,7 @@ def get_weather(location:str)-> str: #it's import to specify the return type
|
|
| 42 |
temperature_data= current["temp_C"], "°C"
|
| 43 |
return f"For {location} location, Weather: {weather_data} Temperature: {temperature_data}"
|
| 44 |
except Exception as e:
|
| 45 |
-
return f"Error fetching weather data for
|
| 46 |
|
| 47 |
@tool
|
| 48 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
|
|
| 42 |
temperature_data= current["temp_C"], "°C"
|
| 43 |
return f"For {location} location, Weather: {weather_data} Temperature: {temperature_data}"
|
| 44 |
except Exception as e:
|
| 45 |
+
return f"Error fetching weather data for location '{location}': {str(e)}"
|
| 46 |
|
| 47 |
@tool
|
| 48 |
def get_current_time_in_timezone(timezone: str) -> str:
|