Skip to content

Implement Maps Grounding#7950

Merged
emilypgoogle merged 16 commits into
mainfrom
ep/maps-grounding
Mar 24, 2026
Merged

Implement Maps Grounding#7950
emilypgoogle merged 16 commits into
mainfrom
ep/maps-grounding

Conversation

@emilypgoogle

Copy link
Copy Markdown
Contributor

Implements support for Maps Grounding, enabling using Google Maps in queries both with semantic logic ("what is in [city]?") and positional logic ("where am I?" combined with latitude/longitude coordinates).

@gemini-code-assist

Copy link
Copy Markdown
Contributor
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

@github-actions

github-actions Bot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

📝 PRs merging into main branch

Our main branch should always be in a releasable state. If you are working on a larger change, or if you don't want this change to see the light of the day just yet, consider using a feature branch first, and only merge into the main branch when the code complete and ready to be released.

@emilypgoogle emilypgoogle requested a review from rlazo March 20, 2026 20:27
@rlazo

rlazo commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements support for Maps Grounding in Firebase AI. The changes include adding new data classes like GoogleMaps, LatLng, MapsGroundingChunk, and RetrievalConfig, and updating existing ones like Tool and GroundingChunk to support the new functionality. New tests have been added to verify the implementation.

My review focuses on improving code clarity, adhering to Kotlin best practices, and fixing issues in documentation and tests. I've identified several areas for minor refactoring, such as removing redundant modifiers and improving KDoc formatting. I also found a potential bug in a serialization test and a non-idiomatic DSL builder implementation. Overall, the changes are well-structured and implement the intended feature.

Comment thread ai-logic/firebase-ai/src/test/java/com/google/firebase/ai/SerializationTests.kt Outdated
Comment thread ai-logic/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Candidate.kt Outdated
Comment thread ai-logic/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Candidate.kt Outdated
Comment thread ai-logic/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/LatLng.kt Outdated
emilypgoogle and others added 8 commits March 20, 2026 15:38
…alizationTests.kt

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…e/ai/GroundingTests.kt

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…pe/Candidate.kt

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…pe/Candidate.kt

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…pe/LatLng.kt

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…pe/RetrievalConfig.kt

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…pe/Tool.kt

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@google-oss-bot

Copy link
Copy Markdown
Collaborator

The public api surface has changed for the subproject ai-logic_firebase-ai:
error: Removed method com.google.firebase.ai.type.RetrievalConfig.retrievalConfig(kotlin.jvm.functions.Function1<? super com.google.firebase.ai.type.RetrievalConfig.Builder,kotlin.Unit>) [RemovedMethod]
error: Added class com.google.firebase.ai.type.RetrievalConfigKt [AddedClass]
error: Added method com.google.firebase.ai.type.Tool.googleMaps() [AddedMethod]
error: Added method com.google.firebase.ai.type.Tool.Companion.googleMaps() [AddedMethod]

Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly.

Comment thread ai-logic/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Candidate.kt Outdated
Comment thread ai-logic/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Tool.kt Outdated
Comment thread ai-logic/firebase-ai/api.txt
Comment thread ai-logic/firebase-ai/api.txt
rlazo
rlazo previously approved these changes Mar 23, 2026
@emilypgoogle emilypgoogle merged commit 16cb887 into main Mar 24, 2026
31 checks passed
@emilypgoogle emilypgoogle deleted the ep/maps-grounding branch March 24, 2026 15:29
rlazo pushed a commit that referenced this pull request Mar 24, 2026
Implements support for Maps Grounding, enabling using Google Maps in
queries both with semantic logic ("what is in [city]?") and positional
logic ("where am I?" combined with latitude/longitude coordinates).

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
emilypgoogle added a commit that referenced this pull request Mar 26, 2026
emilypgoogle added a commit that referenced this pull request Mar 26, 2026
This reverts commit 16cb887.

These changes will be moved to a feature branch until after M179.
emilypgoogle added a commit that referenced this pull request Mar 26, 2026
emilypgoogle added a commit that referenced this pull request Apr 14, 2026
@firebase firebase locked and limited conversation to collaborators Apr 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants