#[non_exhaustive]pub struct GroundingMetadata {
pub web_search_queries: Vec<String>,
pub search_entry_point: Option<SearchEntryPoint>,
pub grounding_chunks: Vec<GroundingChunk>,
pub grounding_supports: Vec<GroundingSupport>,
pub retrieval_metadata: Option<RetrievalMetadata>,
pub google_maps_widget_context_token: Option<String>,
pub source_flagging_uris: Vec<SourceFlaggingUri>,
/* private fields */
}prediction-service or session-service only.Expand description
Metadata returned to client when grounding is enabled.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.web_search_queries: Vec<String>Optional. Web search queries for the following-up web search.
search_entry_point: Option<SearchEntryPoint>Optional. Google search entry for the following-up web searches.
grounding_chunks: Vec<GroundingChunk>List of supporting references retrieved from specified grounding source.
grounding_supports: Vec<GroundingSupport>Optional. List of grounding support.
retrieval_metadata: Option<RetrievalMetadata>Optional. Output only. Retrieval metadata.
google_maps_widget_context_token: Option<String>Optional. Output only. Resource name of the Google Maps widget context token to be used with the PlacesContextElement widget to render contextual data. This is populated only for Google Maps grounding.
source_flagging_uris: Vec<SourceFlaggingUri>List of source flagging uris. This is currently populated only for Google Maps grounding.
Implementations§
Source§impl GroundingMetadata
impl GroundingMetadata
pub fn new() -> Self
Sourcepub fn set_web_search_queries<T, V>(self, v: T) -> Self
pub fn set_web_search_queries<T, V>(self, v: T) -> Self
Sets the value of web_search_queries.
§Example
let x = GroundingMetadata::new().set_web_search_queries(["a", "b", "c"]);Sourcepub fn set_search_entry_point<T>(self, v: T) -> Selfwhere
T: Into<SearchEntryPoint>,
pub fn set_search_entry_point<T>(self, v: T) -> Selfwhere
T: Into<SearchEntryPoint>,
Sets the value of search_entry_point.
§Example
use google_cloud_aiplatform_v1::model::SearchEntryPoint;
let x = GroundingMetadata::new().set_search_entry_point(SearchEntryPoint::default()/* use setters */);Sourcepub fn set_or_clear_search_entry_point<T>(self, v: Option<T>) -> Selfwhere
T: Into<SearchEntryPoint>,
pub fn set_or_clear_search_entry_point<T>(self, v: Option<T>) -> Selfwhere
T: Into<SearchEntryPoint>,
Sets or clears the value of search_entry_point.
§Example
use google_cloud_aiplatform_v1::model::SearchEntryPoint;
let x = GroundingMetadata::new().set_or_clear_search_entry_point(Some(SearchEntryPoint::default()/* use setters */));
let x = GroundingMetadata::new().set_or_clear_search_entry_point(None::<SearchEntryPoint>);Sourcepub fn set_grounding_chunks<T, V>(self, v: T) -> Self
pub fn set_grounding_chunks<T, V>(self, v: T) -> Self
Sets the value of grounding_chunks.
§Example
use google_cloud_aiplatform_v1::model::GroundingChunk;
let x = GroundingMetadata::new()
.set_grounding_chunks([
GroundingChunk::default()/* use setters */,
GroundingChunk::default()/* use (different) setters */,
]);Sourcepub fn set_grounding_supports<T, V>(self, v: T) -> Self
pub fn set_grounding_supports<T, V>(self, v: T) -> Self
Sets the value of grounding_supports.
§Example
use google_cloud_aiplatform_v1::model::GroundingSupport;
let x = GroundingMetadata::new()
.set_grounding_supports([
GroundingSupport::default()/* use setters */,
GroundingSupport::default()/* use (different) setters */,
]);Sourcepub fn set_retrieval_metadata<T>(self, v: T) -> Selfwhere
T: Into<RetrievalMetadata>,
pub fn set_retrieval_metadata<T>(self, v: T) -> Selfwhere
T: Into<RetrievalMetadata>,
Sets the value of retrieval_metadata.
§Example
use google_cloud_aiplatform_v1::model::RetrievalMetadata;
let x = GroundingMetadata::new().set_retrieval_metadata(RetrievalMetadata::default()/* use setters */);Sourcepub fn set_or_clear_retrieval_metadata<T>(self, v: Option<T>) -> Selfwhere
T: Into<RetrievalMetadata>,
pub fn set_or_clear_retrieval_metadata<T>(self, v: Option<T>) -> Selfwhere
T: Into<RetrievalMetadata>,
Sets or clears the value of retrieval_metadata.
§Example
use google_cloud_aiplatform_v1::model::RetrievalMetadata;
let x = GroundingMetadata::new().set_or_clear_retrieval_metadata(Some(RetrievalMetadata::default()/* use setters */));
let x = GroundingMetadata::new().set_or_clear_retrieval_metadata(None::<RetrievalMetadata>);Sourcepub fn set_google_maps_widget_context_token<T>(self, v: T) -> Self
pub fn set_google_maps_widget_context_token<T>(self, v: T) -> Self
Sets the value of google_maps_widget_context_token.
§Example
let x = GroundingMetadata::new().set_google_maps_widget_context_token("example");Sourcepub fn set_or_clear_google_maps_widget_context_token<T>(
self,
v: Option<T>,
) -> Self
pub fn set_or_clear_google_maps_widget_context_token<T>( self, v: Option<T>, ) -> Self
Sets or clears the value of google_maps_widget_context_token.
§Example
let x = GroundingMetadata::new().set_or_clear_google_maps_widget_context_token(Some("example"));
let x = GroundingMetadata::new().set_or_clear_google_maps_widget_context_token(None::<String>);Sourcepub fn set_source_flagging_uris<T, V>(self, v: T) -> Self
pub fn set_source_flagging_uris<T, V>(self, v: T) -> Self
Sets the value of source_flagging_uris.
§Example
use google_cloud_aiplatform_v1::model::grounding_metadata::SourceFlaggingUri;
let x = GroundingMetadata::new()
.set_source_flagging_uris([
SourceFlaggingUri::default()/* use setters */,
SourceFlaggingUri::default()/* use (different) setters */,
]);Trait Implementations§
Source§impl Clone for GroundingMetadata
impl Clone for GroundingMetadata
Source§fn clone(&self) -> GroundingMetadata
fn clone(&self) -> GroundingMetadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more