DoNotChoke commited on
Commit
426bbc0
·
verified ·
1 Parent(s): 6042e7f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -7,14 +7,14 @@ from smolagents import tool, CodeAgent, HfApiModel, GoogleSearchTool
7
  OPENWEATHER_API_KEY = os.environ.get("OPENWEATHER_API_KEY")
8
  SERPER_API_KEY = os.environ.get("SERPER_API_KEY")
9
 
10
- @tool # <-- CHỈ DÙNG 1 DECORATOR
11
  def get_weather(lat: float, lon: float) -> dict | None:
12
  """
13
  Fetches current weather data from OpenWeatherMap API using geographic coordinates
14
 
15
  Args:
16
- lat (float): Latitude of the location (-90 to 90)
17
- lon (float): Longitude of the location (-180 to 180)
18
 
19
  Returns:
20
  dict | None: Weather data dictionary containing:
 
7
  OPENWEATHER_API_KEY = os.environ.get("OPENWEATHER_API_KEY")
8
  SERPER_API_KEY = os.environ.get("SERPER_API_KEY")
9
 
10
+ @tool
11
  def get_weather(lat: float, lon: float) -> dict | None:
12
  """
13
  Fetches current weather data from OpenWeatherMap API using geographic coordinates
14
 
15
  Args:
16
+ lat: Latitude of the location (-90 to 90)
17
+ lon: Longitude of the location (-180 to 180)
18
 
19
  Returns:
20
  dict | None: Weather data dictionary containing: