Struct google_api_proto::google::actions::sdk::v2::interactionmodel::Intent
source · pub struct Intent {
pub parameters: Vec<IntentParameter>,
pub training_phrases: Vec<String>,
}
Expand description
Intents map open-ended user input to structured objects. Spoken phrases are matched to intents with Google’s Natural Language Understanding (NLU). Intent matches can trigger events in your conversation design to progress the user’s conversation. The intent name is specified in the name of the file.
Fields§
§parameters: Vec<IntentParameter>
The list of parameters within the training phrases. All parameters must be defined here to be used in the training phrase.
training_phrases: Vec<String>
Training phrases allow Google’s NLU to automatically match intents with
user input. The more unique phrases that are provided, the better chance
this intent will be matched.
The following is the format of training phrase part which are annotated.
Note that auto
field is optional and the default behavior when auto
is
not specified is equivalent to auto=false
.
($<paramName> '<sample text>' auto=<true or false>)
auto = true
means the part was auto annotated by NLU.
auto = false
means the part was annotated by the user. This is the
default when auto is not specified.
Example:
“Book a flight from ($source ‘San Francisco’ auto=false) to ($dest
‘Vancouver’)”
Trait Implementations§
source§impl Message for Intent
impl Message for Intent
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for Intent
impl PartialEq for Intent
impl StructuralPartialEq for Intent
Auto Trait Implementations§
impl Freeze for Intent
impl RefUnwindSafe for Intent
impl Send for Intent
impl Sync for Intent
impl Unpin for Intent
impl UnwindSafe for Intent
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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