该函数仅适用于中国境内地图(内陆),this function only suitable for locations in Mainland China 根据地址获取地点经纬度, return the coordinates :param address: 地址 :return: 地点经纬度 (纬度, 经度),若无法获取则返回None; return (latitute, longitute)
(address: str)
| 153 | |
| 154 | @tool.get("/get_location") |
| 155 | def get_location(address: str) -> Optional[Tuple[float, float]]: |
| 156 | """ |
| 157 | 该函数仅适用于中国境内地图(内陆),this function only suitable for locations in Mainland China |
| 158 | 根据地址获取地点经纬度, return the coordinates |
| 159 | :param address: 地址 |
| 160 | :return: 地点经纬度 (纬度, 经度),若无法获取则返回None; return (latitute, longitute) |
| 161 | """ |
| 162 | return baidu_map.get_location(address) |
| 163 | |
| 164 | @tool.get("/get_address_by_coordinates") |
| 165 | def get_address_by_coordinates(lat: float, lng: float) -> Optional[str]: |
nothing calls this directly
no test coverage detected