Spaces:
Runtime error
Runtime error
Venkat Srinivasan
commited on
Update tools.py
Browse filesAdd better logging.
tools.py
CHANGED
|
@@ -118,6 +118,7 @@ class Tools:
|
|
| 118 |
|
| 119 |
- location: This can be a city like 'Austin', or a place like 'Austin Airport', etc.
|
| 120 |
"""
|
|
|
|
| 121 |
if (
|
| 122 |
isinstance(location, list)
|
| 123 |
and len(location) != 0
|
|
@@ -145,6 +146,7 @@ class Tools:
|
|
| 145 |
|
| 146 |
# For response format, see https://developers.google.com/maps/documentation/places/web-service/details#PlaceDetailsResponses
|
| 147 |
place_details = self.gmaps.place(place_id=place_id)["result"]
|
|
|
|
| 148 |
return [place_details]
|
| 149 |
|
| 150 |
def get_distance(self, place_1: str, place_2: str):
|
|
|
|
| 118 |
|
| 119 |
- location: This can be a city like 'Austin', or a place like 'Austin Airport', etc.
|
| 120 |
"""
|
| 121 |
+
print (f"Getting location for {location}")
|
| 122 |
if (
|
| 123 |
isinstance(location, list)
|
| 124 |
and len(location) != 0
|
|
|
|
| 146 |
|
| 147 |
# For response format, see https://developers.google.com/maps/documentation/places/web-service/details#PlaceDetailsResponses
|
| 148 |
place_details = self.gmaps.place(place_id=place_id)["result"]
|
| 149 |
+
print (f"Place details for {location}: {place_details}")
|
| 150 |
return [place_details]
|
| 151 |
|
| 152 |
def get_distance(self, place_1: str, place_2: str):
|