ninooo96 commited on
Commit
11eb781
·
verified ·
1 Parent(s): a427387

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -85,7 +85,7 @@ def get_weather_description(code):
85
 
86
  @tool
87
  def get_weather(city: str) -> str:
88
- """A tool that fetches the current weather of a specified city. Response must be translated to the language user used in request
89
  Args:
90
  city: A string representing a city
91
  """
@@ -99,7 +99,7 @@ def get_weather(city: str) -> str:
99
  windspeed = weather_data['current_weather']['windspeed']
100
  wind_unit = weather_data['current_weather_units']['windspeed']
101
  weather_description = get_weather_description(weather_data['current_weather']['weathercode'])
102
- return f"The current temperature on {city} is {temperature}{unit}, the windspeed is {windspeed}{wind_unit} and the condition is {weather_description}"
103
  else:
104
  return "Error on fetching weather data."
105
 
 
85
 
86
  @tool
87
  def get_weather(city: str) -> str:
88
+ """A tool that fetches the current weather information of a specified city.
89
  Args:
90
  city: A string representing a city
91
  """
 
99
  windspeed = weather_data['current_weather']['windspeed']
100
  wind_unit = weather_data['current_weather_units']['windspeed']
101
  weather_description = get_weather_description(weather_data['current_weather']['weathercode'])
102
+ return f"This is the weather on {city}. Temperature on {city} is {temperature}{unit}, the windspeed is {windspeed}{wind_unit} and the condition is {weather_description}"
103
  else:
104
  return "Error on fetching weather data."
105