Danibholie commited on
Commit
715974a
·
verified ·
1 Parent(s): 92e6361

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -41,11 +41,12 @@ def get_weather(location: str, api_key: str) -> dict:
41
  A tool that fetches the current weather data for a specified location.
42
 
43
  Args:
44
- location (str): The city name to get weather data (e.g., 'New York').
45
- api_key (str): Your OpenWeatherMap API key.
46
 
47
  Returns:
48
- dict: A dictionary containing weather details or an error message.
 
49
  """
50
  base_url = "https://api.openweathermap.org/data/2.5/weather"
51
  params = {
 
41
  A tool that fetches the current weather data for a specified location.
42
 
43
  Args:
44
+ location: A string representing the city name to get weather data (e.g., 'New York').
45
+ api_key: A string representing your OpenWeatherMap API key.
46
 
47
  Returns:
48
+ A dictionary containing weather details such as city name, temperature, description, humidity, and wind speed.
49
+ If an error occurs, it returns a dictionary with an "error" key and an error message.
50
  """
51
  base_url = "https://api.openweathermap.org/data/2.5/weather"
52
  params = {