Mehmet-Ali commited on
Commit
623b015
·
verified ·
1 Parent(s): f45652d

Update tools/mapbox_tools.py

Browse files

Extended the docstring, imported os

Files changed (1) hide show
  1. tools/mapbox_tools.py +2 -1
tools/mapbox_tools.py CHANGED
@@ -1,7 +1,7 @@
1
  import requests
2
  from typing import Dict, List, Optional
3
  from smolagents import tool
4
- import math
5
 
6
  # constants
7
  WGS84_AVG_EARTH_RADIUS = 637100080.0 # in centimeters
@@ -46,6 +46,7 @@ def search_nearby_places(latitude: float, longitude: float, radius: int = 1000,
46
  latitude: The latitude coordinate of the center point
47
  longitude: The longitude coordinate of the center point
48
  radius: The radius (in meters) to search within
 
49
  """
50
  # Mapbox Search API endpoint
51
  url = f"https://api.mapbox.com/search/searchbox/v1/category/{category}"
 
1
  import requests
2
  from typing import Dict, List, Optional
3
  from smolagents import tool
4
+ import math, os
5
 
6
  # constants
7
  WGS84_AVG_EARTH_RADIUS = 637100080.0 # in centimeters
 
46
  latitude: The latitude coordinate of the center point
47
  longitude: The longitude coordinate of the center point
48
  radius: The radius (in meters) to search within
49
+ category: Point of Interest (POI) category to search
50
  """
51
  # Mapbox Search API endpoint
52
  url = f"https://api.mapbox.com/search/searchbox/v1/category/{category}"