Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Description
Add Google Maps Geocoding API integration to the community package. This integration allows users to convert addresses into geographic coordinates using the Google Maps Geocoding API. The tool is designed to be composable with other Google services and LangChain tools, making it ideal for building location-aware applications.
Key Features:
Integration Opportunities:
Relevant issues
N/A
Type
🆕 New Feature
Changes
Added new files:
langchain_google_community/geocoding.py
: Main implementation with complete type hintstests/unit_tests/test_geocoding.py
: Unit teststests/integration_tests/test_geocoding.py
: Integration testsdocs/docs/integrations/geocoding.ipynb
: Documentation and examplesModified existing files:
langchain_google_community/__init__.py
to expose the new geocoding toolsgooglemaps
dependency to the places group inpyproject.toml
Features implemented:
GoogleGeocodingAPIWrapper
: Direct API interactionGoogleGeocodingTool
: LangChain tool integrationType System:
googlemaps
package doesn't provide type stubs (common for many Google API clients)Testing
All tests pass successfully.
All tests pass successfully with a valid Google Maps API key.
Note
Requirements:
Example usage: