rchrdgwr commited on
Commit
7801285
·
verified ·
1 Parent(s): 020fbb2

add docstring

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -47,9 +47,12 @@ def get_population(country:str)-> str: #it's import to specify the return type
47
 
48
  @tool
49
  def get_weather(city:str) -> str:
 
 
 
 
50
  API_KEY = os.getenv("WAPI")
51
- CITY = "New York"
52
- URL = f"http://api.weatherapi.com/v1/current.json?key={API_KEY}&q={CITY}&aqi=no"
53
  response = requests.get(URL)
54
  if response.status_code == 200:
55
  data = response.json()
 
47
 
48
  @tool
49
  def get_weather(city:str) -> str:
50
+ """A tool that returns the population for a country
51
+ Args:
52
+ city: a string representing the a city to find the weather for
53
+ """
54
  API_KEY = os.getenv("WAPI")
55
+ URL = f"http://api.weatherapi.com/v1/current.json?key={API_KEY}&q={city}&aqi=no"
 
56
  response = requests.get(URL)
57
  if response.status_code == 200:
58
  data = response.json()