Skip to content

Commit e58f813

Browse files
Google APIscopybara-github
authored andcommitted
feat: add Grounding with Google Maps tool
PiperOrigin-RevId: 792213276
1 parent 67fe1ec commit e58f813

File tree

4 files changed

+68
-0
lines changed

4 files changed

+68
-0
lines changed

google/cloud/aiplatform/v1/content.proto

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,13 +660,32 @@ message GroundingChunk {
660660
optional string text = 3;
661661
}
662662

663+
// Chunk from Google Maps.
664+
message Maps {
665+
// URI reference of the chunk.
666+
optional string uri = 1;
667+
668+
// Title of the chunk.
669+
optional string title = 2;
670+
671+
// Text of the chunk.
672+
optional string text = 3;
673+
674+
// This Place's resource name, in `places/{place_id}` format. Can be used
675+
// to look up the Place.
676+
optional string place_id = 4;
677+
}
678+
663679
// Chunk type.
664680
oneof chunk_type {
665681
// Grounding chunk from the web.
666682
Web web = 1;
667683

668684
// Grounding chunk from context retrieved by the retrieval tools.
669685
RetrievedContext retrieved_context = 2;
686+
687+
// Grounding chunk from Google Maps.
688+
Maps maps = 3;
670689
}
671690
}
672691

@@ -709,6 +728,14 @@ message GroundingMetadata {
709728
(google.api.field_behavior) = OPTIONAL,
710729
(google.api.field_behavior) = OUTPUT_ONLY
711730
];
731+
732+
// Optional. Output only. Resource name of the Google Maps widget context
733+
// token to be used with the PlacesContextElement widget to render contextual
734+
// data. This is populated only for Google Maps grounding.
735+
optional string google_maps_widget_context_token = 8 [
736+
(google.api.field_behavior) = OPTIONAL,
737+
(google.api.field_behavior) = OUTPUT_ONLY
738+
];
712739
}
713740

714741
// Google search entry point.

google/cloud/aiplatform/v1/tool.proto

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ message Tool {
9797
GoogleSearchRetrieval google_search_retrieval = 3
9898
[(google.api.field_behavior) = OPTIONAL];
9999

100+
// Optional. GoogleMaps tool type.
101+
// Tool to support Google Maps in Model.
102+
GoogleMaps google_maps = 5 [(google.api.field_behavior) = OPTIONAL];
103+
100104
// Optional. Tool to support searching public web data, powered by Vertex AI
101105
// Search and Sec4 compliance.
102106
EnterpriseWebSearch enterprise_web_search = 6
@@ -371,6 +375,9 @@ message GoogleSearchRetrieval {
371375
DynamicRetrievalConfig dynamic_retrieval_config = 2;
372376
}
373377

378+
// Tool to retrieve public maps data for grounding, powered by Google.
379+
message GoogleMaps {}
380+
374381
// Tool to search public web data, powered by Vertex AI Search and Sec4
375382
// compliance.
376383
message EnterpriseWebSearch {

google/cloud/aiplatform/v1beta1/content.proto

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,13 +749,32 @@ message GroundingChunk {
749749
optional string text = 3;
750750
}
751751

752+
// Chunk from Google Maps.
753+
message Maps {
754+
// URI reference of the chunk.
755+
optional string uri = 1;
756+
757+
// Title of the chunk.
758+
optional string title = 2;
759+
760+
// Text of the chunk.
761+
optional string text = 3;
762+
763+
// This Place's resource name, in `places/{place_id}` format. Can be used
764+
// to look up the Place.
765+
optional string place_id = 4;
766+
}
767+
752768
// Chunk type.
753769
oneof chunk_type {
754770
// Grounding chunk from the web.
755771
Web web = 1;
756772

757773
// Grounding chunk from context retrieved by the retrieval tools.
758774
RetrievedContext retrieved_context = 2;
775+
776+
// Grounding chunk from Google Maps.
777+
Maps maps = 3;
759778
}
760779
}
761780

@@ -802,6 +821,14 @@ message GroundingMetadata {
802821
(google.api.field_behavior) = OPTIONAL,
803822
(google.api.field_behavior) = OUTPUT_ONLY
804823
];
824+
825+
// Optional. Output only. Resource name of the Google Maps widget context
826+
// token to be used with the PlacesContextElement widget to render contextual
827+
// data. This is populated only for Google Maps grounding.
828+
optional string google_maps_widget_context_token = 8 [
829+
(google.api.field_behavior) = OPTIONAL,
830+
(google.api.field_behavior) = OUTPUT_ONLY
831+
];
805832
}
806833

807834
// Google search entry point.

google/cloud/aiplatform/v1beta1/tool.proto

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ message Tool {
9898
GoogleSearchRetrieval google_search_retrieval = 3
9999
[(google.api.field_behavior) = OPTIONAL];
100100

101+
// Optional. GoogleMaps tool type.
102+
// Tool to support Google Maps in Model.
103+
GoogleMaps google_maps = 5 [(google.api.field_behavior) = OPTIONAL];
104+
101105
// Optional. Tool to support searching public web data, powered by Vertex AI
102106
// Search and Sec4 compliance.
103107
EnterpriseWebSearch enterprise_web_search = 6
@@ -436,6 +440,9 @@ message GoogleSearchRetrieval {
436440
DynamicRetrievalConfig dynamic_retrieval_config = 2;
437441
}
438442

443+
// Tool to retrieve public maps data for grounding, powered by Google.
444+
message GoogleMaps {}
445+
439446
// Tool to search public web data, powered by Vertex AI Search and Sec4
440447
// compliance.
441448
message EnterpriseWebSearch {

0 commit comments

Comments
 (0)