[][src]Struct gcp_client::google::cloud::dialogflow::v2beta1::intents_client::IntentsClient

pub struct IntentsClient<T> { /* fields omitted */ }

An intent represents a mapping between input from a user and an action to be taken by your application. When you pass user input to the [DetectIntent][google.cloud.dialogflow.v2beta1.Sessions.DetectIntent] (or [StreamingDetectIntent][google.cloud.dialogflow.v2beta1.Sessions.StreamingDetectIntent]) method, the Dialogflow API analyzes the input and searches for a matching intent. If no match is found, the Dialogflow API returns a fallback intent (is_fallback = true).

You can provide additional information for the Dialogflow API to use to match user input to an intent by adding the following to your intent.

  • Contexts - provide additional context for intent analysis. For example, if an intent is related to an object in your application that plays music, you can provide a context to determine when to match the intent if the user input is "turn it off". You can include a context that matches the intent when there is previous user input of "play music", and not when there is previous user input of "turn on the light".

  • Events - allow for matching an intent by using an event name instead of user input. Your application can provide an event name and related parameters to the Dialogflow API to match an intent. For example, when your application starts, you can send a welcome event with a user name parameter to the Dialogflow API to match an intent with a personalized welcome message for the user.

  • Training phrases - provide examples of user input to train the Dialogflow API agent to better match intents.

For more information about intents, see the Dialogflow documentation.

Implementations

impl<T> IntentsClient<T> where
    T: GrpcService<BoxBody>,
    T::ResponseBody: Body + HttpBody + Send + 'static,
    T::Error: Into<StdError>,
    <T::ResponseBody as HttpBody>::Error: Into<StdError> + Send
[src]

pub fn new(inner: T) -> Self[src]

pub fn with_interceptor(inner: T, interceptor: impl Into<Interceptor>) -> Self[src]

pub async fn list_intents<'_>(
    &'_ mut self,
    request: impl IntoRequest<ListIntentsRequest>
) -> Result<Response<ListIntentsResponse>, Status>
[src]

Returns the list of all intents in the specified agent.

pub async fn get_intent<'_>(
    &'_ mut self,
    request: impl IntoRequest<GetIntentRequest>
) -> Result<Response<Intent>, Status>
[src]

Retrieves the specified intent.

pub async fn create_intent<'_>(
    &'_ mut self,
    request: impl IntoRequest<CreateIntentRequest>
) -> Result<Response<Intent>, Status>
[src]

Creates an intent in the specified agent.

pub async fn update_intent<'_>(
    &'_ mut self,
    request: impl IntoRequest<UpdateIntentRequest>
) -> Result<Response<Intent>, Status>
[src]

Updates the specified intent.

pub async fn delete_intent<'_>(
    &'_ mut self,
    request: impl IntoRequest<DeleteIntentRequest>
) -> Result<Response<()>, Status>
[src]

Deletes the specified intent and its direct or indirect followup intents.

pub async fn batch_update_intents<'_>(
    &'_ mut self,
    request: impl IntoRequest<BatchUpdateIntentsRequest>
) -> Result<Response<Operation>, Status>
[src]

Updates/Creates multiple intents in the specified agent.

Operation <response: [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse]>

pub async fn batch_delete_intents<'_>(
    &'_ mut self,
    request: impl IntoRequest<BatchDeleteIntentsRequest>
) -> Result<Response<Operation>, Status>
[src]

Deletes intents in the specified agent.

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>

Trait Implementations

impl<T: Clone> Clone for IntentsClient<T>[src]

impl<T> Debug for IntentsClient<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for IntentsClient<T>

impl<T> Send for IntentsClient<T> where
    T: Send

impl<T> Sync for IntentsClient<T> where
    T: Sync

impl<T> Unpin for IntentsClient<T> where
    T: Unpin

impl<T> !UnwindSafe for IntentsClient<T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]