Skip to main content
GoogleMapTools 使 Agent 能够与各种 Google Maps 服务进行交互,以执行基于位置的操作,包括地点搜索、路线、地理编码等更多功能。

先决条件

以下示例需要 googlemaps 库和一个 API 密钥,可以通过 Google Cloud Console 获取。
您需要在 Google Cloud Console 中启用以下 API:
  • Places API
  • Directions API
  • Geocoding API
  • Address Validation API
  • Distance Matrix API
  • Elevation API
  • Time Zone API

示例

Google Maps 工具的基本用法:
更多示例,请参阅 Google Maps Tools 示例

工具箱参数

工具箱函数

用量限制

Google Maps API 有使用限制和配额,具体取决于服务和账单计划。请参阅 Google Maps Platform 定价获取详细信息。

开发者资源