knt21 commited on
Commit
53197ae
·
verified ·
1 Parent(s): 5c1b856

Update app.py

Browse files

Fix error message for get_weather tool

Files changed (1) hide show
  1. app.py +1 -1
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 timezone '{location}': {str(e)}"
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: