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.

https://github.com/spring-projects/spring-ai/blob/740a61cec4334aafbb9d2d3cc835558d16df3800/models/spring-ai-google-genai/src/main/java/org/springframework/ai/google/genai/GoogleGenAiChatModel.java#L803-L807

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: https://github.com/googleapis/java-genai/pull/232

Comment From: yasu89

If needed, I would be happy to contribute an implementation.

My proposed approach is to extend the GoogleGenAiChatOptions class by adding the following four parameters: - googleMap: Enables or disables Grounding with Google Maps - googleMapEnableWidget: Enables or disables Places Widgets - latitude - longitude

Regarding the response field groundingMetadata, I am planning to store it in the metadata field of ChatGenerationMetadata. https://github.com/spring-projects/spring-ai/blob/5cb5c90a0c2621e0a2776b4f7478eb0eefcacdf6/spring-ai-model/src/main/java/org/springframework/ai/chat/metadata/ChatGenerationMetadata.java#L33