Skip to content

Support Gemini Grounding with Google Maps #5018

@yasu89

Description

@yasu89

Expected Behavior

I would like Spring AI to support Grounding with Google Maps.

It would also be great if the following parameters could be added, including support for location information and Places Widgets:

  • latitude / longitude
  • Places Widgets–related options

Current Behavior

Currently, Spring AI does not support the Grounding with Google Maps feature.

Similar to GoogleSearchRetrieval, this feature requires adding tools using the mechanism provided by google-genai, but Spring AI does not yet offer a way to register or configure these tools for Maps Grounding.

if (prompt.getOptions() instanceof GoogleGenAiChatOptions options && options.getGoogleSearchRetrieval()) {
var googleSearch = GoogleSearch.builder().build();
final var googleSearchRetrievalTool = Tool.builder().googleSearch(googleSearch).build();
tools.add(googleSearchRetrievalTool);
}

Context

Google recently released the new Google Maps tool for Gemini:
https://ai.google.dev/gemini-api/docs/maps-grounding

This feature has already been supported in the GenAI SDK as well:
googleapis/java-genai#232

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions