feat: Add Google Maps and File Search tool support#156
Closed
jfradj wants to merge 18 commits intogoogle-gemini-php:mainfrom
Closed
feat: Add Google Maps and File Search tool support#156jfradj wants to merge 18 commits intogoogle-gemini-php:mainfrom
jfradj wants to merge 18 commits intogoogle-gemini-php:mainfrom
Conversation
This commit introduces comprehensive support for Google Maps and File Search tools, enhancing the client's grounding capabilities.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive support for Google Maps and File Search tools to enhance the Gemini client's grounding capabilities. The implementation introduces new data classes for these tools and their configurations, integrates them into the existing Tool system, and provides comprehensive test coverage and documentation.
Key Changes:
- Added
GoogleMaps,FileSearch, andRetrievalConfigdata classes with proper serialization support - Extended
ToolandToolConfigto support the new grounding tools - Added comprehensive test coverage for the new functionality
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/Data/GoogleMaps.php |
Implements GoogleMaps tool with optional enableWidget parameter, follows stdClass pattern for empty state |
src/Data/FileSearch.php |
Implements FileSearch tool with required fileSearchStoreNames and optional metadataFilter |
src/Data/RetrievalConfig.php |
Implements geographical context configuration with latitude/longitude for use with GoogleMaps |
src/Data/Tool.php |
Extends Tool class to support googleMaps and fileSearch parameters |
src/Data/ToolConfig.php |
Extends ToolConfig to support retrievalConfig for geographical grounding |
tests/Data/Tool.php |
Comprehensive tests for GoogleMaps and FileSearch tool serialization |
tests/Data/ToolConfig.php |
Tests for ToolConfig with RetrievalConfig in various combinations |
src/Testing/Resources/FileSearchStoresTestResource.php |
Test resource referencing missing contract, resource, and response classes (incomplete implementation) |
src/Testing/ClientFake.php |
Adds fileSearchStores() method without corresponding implementation in real Client |
README.md |
Documentation for Google Maps and File Search grounding with examples and usage patterns |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
Author
|
PR #157 should be accepted first |
Member
|
Hi @jfradj |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This commit introduces comprehensive support for Google Maps and File Search tools, enhancing the client's grounding capabilities.