#[non_exhaustive]pub struct Example {
pub name: String,
pub display_name: String,
pub description: String,
pub entry_agent: String,
pub messages: Vec<Message>,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub invalid: bool,
pub etag: String,
/* private fields */
}Expand description
An example represents a sample conversation between the user and the agent(s).
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.name: StringIdentifier. The unique identifier of the example.
Format:
projects/{project}/locations/{location}/apps/{app}/examples/{example}
display_name: StringRequired. Display name of the example.
description: StringOptional. Human-readable description of the example.
entry_agent: StringOptional. The agent that initially handles the conversation. If not
specified, the example represents a conversation that is handled by the
root agent. Format:
projects/{project}/locations/{location}/apps/{app}/agents/{agent}
messages: Vec<Message>Optional. The collection of messages that make up the conversation.
create_time: Option<Timestamp>Output only. Timestamp when the example was created.
update_time: Option<Timestamp>Output only. Timestamp when the example was last updated.
invalid: boolOutput only. The example may become invalid if referencing resources are deleted. Invalid examples will not be used as few-shot examples.
etag: StringEtag used to ensure the object hasn’t changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.
Implementations§
Source§impl Example
impl Example
Sourcepub fn set_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_display_name<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_entry_agent<T: Into<String>>(self, v: T) -> Self
pub fn set_entry_agent<T: Into<String>>(self, v: T) -> Self
Sets the value of entry_agent.
§Example
let x = Example::new().set_entry_agent(format!("projects/{project_id}/locations/{location_id}/apps/{app_id}/agents/{agent_id}"));Sourcepub fn set_messages<T, V>(self, v: T) -> Self
pub fn set_messages<T, V>(self, v: T) -> Self
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
use wkt::Timestamp;
let x = Example::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
use wkt::Timestamp;
let x = Example::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Example::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
§Example
use wkt::Timestamp;
let x = Example::new().set_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
§Example
use wkt::Timestamp;
let x = Example::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = Example::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_invalid<T: Into<bool>>(self, v: T) -> Self
pub fn set_invalid<T: Into<bool>>(self, v: T) -> Self
Trait Implementations§
impl StructuralPartialEq for Example
Auto Trait Implementations§
impl Freeze for Example
impl RefUnwindSafe for Example
impl Send for Example
impl Sync for Example
impl Unpin for Example
impl UnsafeUnpin for Example
impl UnwindSafe for Example
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request