#[non_exhaustive]pub struct EventMetadata {
pub grounding_metadata: Option<GroundingMetadata>,
pub partial: bool,
pub turn_complete: bool,
pub interrupted: bool,
pub long_running_tool_ids: Vec<String>,
pub branch: String,
pub custom_metadata: Option<Struct>,
pub input_transcription: Option<Transcription>,
pub output_transcription: Option<Transcription>,
/* private fields */
}session-service only.Expand description
Metadata relating to a LLM response event.
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.grounding_metadata: Option<GroundingMetadata>Optional. Metadata returned to client when grounding is enabled.
partial: boolOptional. Indicates whether the text content is part of a unfinished text stream. Only used for streaming mode and when the content is plain text.
turn_complete: boolOptional. Indicates whether the response from the model is complete. Only used for streaming mode.
interrupted: boolOptional. Flag indicating that LLM was interrupted when generating the content. Usually it’s due to user interruption during a bidi streaming.
long_running_tool_ids: Vec<String>Optional. Set of ids of the long running function calls. Agent client will know from this field about which function call is long running. Only valid for function call event.
branch: StringOptional. The branch of the event. The format is like agent_1.agent_2.agent_3, where agent_1 is the parent of agent_2, and agent_2 is the parent of agent_3. Branch is used when multiple child agents shouldn’t see their siblings’ conversation history.
custom_metadata: Option<Struct>The custom metadata of the LlmResponse.
input_transcription: Option<Transcription>Optional. Audio transcription of user input.
output_transcription: Option<Transcription>Optional. Audio transcription of model output.
Implementations§
Source§impl EventMetadata
impl EventMetadata
pub fn new() -> Self
Sourcepub fn set_grounding_metadata<T>(self, v: T) -> Selfwhere
T: Into<GroundingMetadata>,
pub fn set_grounding_metadata<T>(self, v: T) -> Selfwhere
T: Into<GroundingMetadata>,
Sets the value of grounding_metadata.
§Example
use google_cloud_aiplatform_v1::model::GroundingMetadata;
let x = EventMetadata::new().set_grounding_metadata(GroundingMetadata::default()/* use setters */);Sourcepub fn set_or_clear_grounding_metadata<T>(self, v: Option<T>) -> Selfwhere
T: Into<GroundingMetadata>,
pub fn set_or_clear_grounding_metadata<T>(self, v: Option<T>) -> Selfwhere
T: Into<GroundingMetadata>,
Sets or clears the value of grounding_metadata.
§Example
use google_cloud_aiplatform_v1::model::GroundingMetadata;
let x = EventMetadata::new().set_or_clear_grounding_metadata(Some(GroundingMetadata::default()/* use setters */));
let x = EventMetadata::new().set_or_clear_grounding_metadata(None::<GroundingMetadata>);Sourcepub fn set_partial<T: Into<bool>>(self, v: T) -> Self
pub fn set_partial<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_turn_complete<T: Into<bool>>(self, v: T) -> Self
pub fn set_turn_complete<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_interrupted<T: Into<bool>>(self, v: T) -> Self
pub fn set_interrupted<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_long_running_tool_ids<T, V>(self, v: T) -> Self
pub fn set_long_running_tool_ids<T, V>(self, v: T) -> Self
Sets the value of long_running_tool_ids.
§Example
let x = EventMetadata::new().set_long_running_tool_ids(["a", "b", "c"]);Sourcepub fn set_branch<T: Into<String>>(self, v: T) -> Self
pub fn set_branch<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_custom_metadata<T>(self, v: T) -> Self
pub fn set_custom_metadata<T>(self, v: T) -> Self
Sets the value of custom_metadata.
§Example
use wkt::Struct;
let x = EventMetadata::new().set_custom_metadata(Struct::default()/* use setters */);Sourcepub fn set_or_clear_custom_metadata<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_custom_metadata<T>(self, v: Option<T>) -> Self
Sets or clears the value of custom_metadata.
§Example
use wkt::Struct;
let x = EventMetadata::new().set_or_clear_custom_metadata(Some(Struct::default()/* use setters */));
let x = EventMetadata::new().set_or_clear_custom_metadata(None::<Struct>);Sourcepub fn set_input_transcription<T>(self, v: T) -> Selfwhere
T: Into<Transcription>,
pub fn set_input_transcription<T>(self, v: T) -> Selfwhere
T: Into<Transcription>,
Sets the value of input_transcription.
§Example
use google_cloud_aiplatform_v1::model::Transcription;
let x = EventMetadata::new().set_input_transcription(Transcription::default()/* use setters */);Sourcepub fn set_or_clear_input_transcription<T>(self, v: Option<T>) -> Selfwhere
T: Into<Transcription>,
pub fn set_or_clear_input_transcription<T>(self, v: Option<T>) -> Selfwhere
T: Into<Transcription>,
Sets or clears the value of input_transcription.
§Example
use google_cloud_aiplatform_v1::model::Transcription;
let x = EventMetadata::new().set_or_clear_input_transcription(Some(Transcription::default()/* use setters */));
let x = EventMetadata::new().set_or_clear_input_transcription(None::<Transcription>);Sourcepub fn set_output_transcription<T>(self, v: T) -> Selfwhere
T: Into<Transcription>,
pub fn set_output_transcription<T>(self, v: T) -> Selfwhere
T: Into<Transcription>,
Sets the value of output_transcription.
§Example
use google_cloud_aiplatform_v1::model::Transcription;
let x = EventMetadata::new().set_output_transcription(Transcription::default()/* use setters */);Sourcepub fn set_or_clear_output_transcription<T>(self, v: Option<T>) -> Selfwhere
T: Into<Transcription>,
pub fn set_or_clear_output_transcription<T>(self, v: Option<T>) -> Selfwhere
T: Into<Transcription>,
Sets or clears the value of output_transcription.
§Example
use google_cloud_aiplatform_v1::model::Transcription;
let x = EventMetadata::new().set_or_clear_output_transcription(Some(Transcription::default()/* use setters */));
let x = EventMetadata::new().set_or_clear_output_transcription(None::<Transcription>);Trait Implementations§
Source§impl Clone for EventMetadata
impl Clone for EventMetadata
Source§fn clone(&self) -> EventMetadata
fn clone(&self) -> EventMetadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more