Skip to content

Commit 329ace5

Browse files
Google APIscopybara-github
authored andcommitted
feat: Add enable_widget option in Google Maps and additional grounding information
PiperOrigin-RevId: 810967796
1 parent 68bc915 commit 329ace5

File tree

4 files changed

+84
-2
lines changed

4 files changed

+84
-2
lines changed

google/cloud/aiplatform/v1/content.proto

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,6 +667,22 @@ message GroundingChunk {
667667

668668
// Chunk from Google Maps.
669669
message Maps {
670+
message PlaceAnswerSources {
671+
// Encapsulates a review snippet.
672+
message ReviewSnippet {
673+
// Id of the review referencing the place.
674+
string review_id = 1;
675+
676+
// A link to show the review on Google Maps.
677+
string google_maps_uri = 2;
678+
679+
// Title of the review.
680+
string title = 3;
681+
}
682+
683+
// Snippets of reviews that are used to generate the answer.
684+
repeated ReviewSnippet review_snippets = 1;
685+
}
670686
// URI reference of the chunk.
671687
optional string uri = 1;
672688

@@ -679,6 +695,11 @@ message GroundingChunk {
679695
// This Place's resource name, in `places/{place_id}` format. Can be used
680696
// to look up the Place.
681697
optional string place_id = 4;
698+
699+
// Sources used to generate the place answer.
700+
// This includes review snippets and photos that were used to generate the
701+
// answer, as well as uris to flag content.
702+
PlaceAnswerSources place_answer_sources = 5;
682703
}
683704

684705
// Chunk type.
@@ -741,6 +762,23 @@ message GroundingMetadata {
741762
(google.api.field_behavior) = OPTIONAL,
742763
(google.api.field_behavior) = OUTPUT_ONLY
743764
];
765+
766+
// Source content flagging uri for a place or review. This is currently
767+
// populated only for Google Maps grounding.
768+
message SourceFlaggingUri {
769+
// Id of the place or review.
770+
string source_id = 1;
771+
772+
// A link where users can flag a problem with the source (place or review).
773+
// (-- The link is generated by Google and it does not contain
774+
// information from the user query. It may contain information of the
775+
// content it is flagging, which can be used to identify places. --)
776+
string flag_content_uri = 2;
777+
}
778+
779+
// List of source flagging uris. This is currently populated only for Google
780+
// Maps grounding.
781+
repeated SourceFlaggingUri source_flagging_uris = 9;
744782
}
745783

746784
// Google search entry point.

google/cloud/aiplatform/v1/tool.proto

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,10 @@ message GoogleSearchRetrieval {
376376
}
377377

378378
// Tool to retrieve public maps data for grounding, powered by Google.
379-
message GoogleMaps {}
379+
message GoogleMaps {
380+
// If true, include the widget context token in the response.
381+
bool enable_widget = 1 [(google.api.field_behavior) = OPTIONAL];
382+
}
380383

381384
// Tool to search public web data, powered by Vertex AI Search and Sec4
382385
// compliance.

google/cloud/aiplatform/v1beta1/content.proto

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,22 @@ message GroundingChunk {
756756

757757
// Chunk from Google Maps.
758758
message Maps {
759+
message PlaceAnswerSources {
760+
// Encapsulates a review snippet.
761+
message ReviewSnippet {
762+
// Id of the review referencing the place.
763+
string review_id = 1;
764+
765+
// A link to show the review on Google Maps.
766+
string google_maps_uri = 2;
767+
768+
// Title of the review.
769+
string title = 3;
770+
}
771+
772+
// Snippets of reviews that are used to generate the answer.
773+
repeated ReviewSnippet review_snippets = 1;
774+
}
759775
// URI reference of the chunk.
760776
optional string uri = 1;
761777

@@ -768,6 +784,11 @@ message GroundingChunk {
768784
// This Place's resource name, in `places/{place_id}` format. Can be used
769785
// to look up the Place.
770786
optional string place_id = 4;
787+
788+
// Sources used to generate the place answer.
789+
// This includes review snippets and photos that were used to generate the
790+
// answer, as well as uris to flag content.
791+
PlaceAnswerSources place_answer_sources = 5;
771792
}
772793

773794
// Chunk type.
@@ -834,6 +855,23 @@ message GroundingMetadata {
834855
(google.api.field_behavior) = OPTIONAL,
835856
(google.api.field_behavior) = OUTPUT_ONLY
836857
];
858+
859+
// Source content flagging uri for a place or review. This is currently
860+
// populated only for Google Maps grounding.
861+
message SourceFlaggingUri {
862+
// Id of the place or review.
863+
string source_id = 1;
864+
865+
// A link where users can flag a problem with the source (place or review).
866+
// (-- The link is generated by Google and it does not contain
867+
// information from the user query. It may contain information of the
868+
// content it is flagging, which can be used to identify places. --)
869+
string flag_content_uri = 2;
870+
}
871+
872+
// List of source flagging uris. This is currently populated only for Google
873+
// Maps grounding.
874+
repeated SourceFlaggingUri source_flagging_uris = 9;
837875
}
838876

839877
// Google search entry point.

google/cloud/aiplatform/v1beta1/tool.proto

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,10 @@ message GoogleSearchRetrieval {
441441
}
442442

443443
// Tool to retrieve public maps data for grounding, powered by Google.
444-
message GoogleMaps {}
444+
message GoogleMaps {
445+
// If true, include the widget context token in the response.
446+
bool enable_widget = 1 [(google.api.field_behavior) = OPTIONAL];
447+
}
445448

446449
// Tool to search public web data, powered by Vertex AI Search and Sec4
447450
// compliance.

0 commit comments

Comments
 (0)