pub struct SessionsClient<T> { /* private fields */ }
Expand description
A session represents an interaction with a user. You retrieve user input and pass it to the [DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] (or [StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent]) method to determine user intent and respond.
Implementations§
Source§impl<T> SessionsClient<T>where
T: GrpcService<BoxBody>,
T::ResponseBody: Body + HttpBody + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as HttpBody>::Error: Into<StdError> + Send,
impl<T> SessionsClient<T>where
T: GrpcService<BoxBody>,
T::ResponseBody: Body + HttpBody + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as HttpBody>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_interceptor(inner: T, interceptor: impl Into<Interceptor>) -> Self
Sourcepub async fn detect_intent(
&mut self,
request: impl IntoRequest<DetectIntentRequest>,
) -> Result<Response<DetectIntentResponse>, Status>
pub async fn detect_intent( &mut self, request: impl IntoRequest<DetectIntentRequest>, ) -> Result<Response<DetectIntentResponse>, Status>
Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries.
Sourcepub async fn streaming_detect_intent(
&mut self,
request: impl IntoStreamingRequest<Message = StreamingDetectIntentRequest>,
) -> Result<Response<Streaming<StreamingDetectIntentResponse>>, Status>
pub async fn streaming_detect_intent( &mut self, request: impl IntoStreamingRequest<Message = StreamingDetectIntentRequest>, ) -> Result<Response<Streaming<StreamingDetectIntentResponse>>, Status>
Processes a natural language query in audio format in a streaming fashion and returns structured, actionable data as a result. This method is only available via the gRPC API (not REST).
Trait Implementations§
Source§impl<T: Clone> Clone for SessionsClient<T>
impl<T: Clone> Clone for SessionsClient<T>
Auto Trait Implementations§
impl<T> Freeze for SessionsClient<T>where
T: Freeze,
impl<T> !RefUnwindSafe for SessionsClient<T>
impl<T> Send for SessionsClient<T>where
T: Send,
impl<T> Sync for SessionsClient<T>where
T: Sync,
impl<T> Unpin for SessionsClient<T>where
T: Unpin,
impl<T> !UnwindSafe for SessionsClient<T>
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> 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>
Wrap the input message
T
in a tonic::Request