pub struct StreamingDetectIntentResponse {
pub response_id: String,
pub recognition_result: Option<StreamingRecognitionResult>,
pub query_result: Option<QueryResult>,
pub alternative_query_results: Vec<QueryResult>,
pub webhook_status: Option<Status>,
pub output_audio: Bytes,
pub output_audio_config: Option<OutputAudioConfig>,
pub debugging_info: Option<CloudConversationDebuggingInfo>,
}
Expand description
The top-level message returned from the
StreamingDetectIntent
method.
Multiple response messages can be returned in order:
-
If the
StreamingDetectIntentRequest.input_audio
field was set, therecognition_result
field is populated for one or more messages. See the [StreamingRecognitionResult][google.cloud.dialogflow.v2beta1.StreamingRecognitionResult] message for details about the result message sequence. -
The next message contains
response_id
,query_result
,alternative_query_results
and optionallywebhook_status
if a WebHook was called. -
If
output_audio_config
was specified in the request or agent-level speech synthesizer is configured, all subsequent messages containoutput_audio
andoutput_audio_config
.
Fields§
§response_id: String
The unique identifier of the response. It can be used to locate a response in the training example set or for reporting issues.
recognition_result: Option<StreamingRecognitionResult>
The result of speech recognition.
query_result: Option<QueryResult>
The selected results of the conversational query or event processing.
See alternative_query_results
for additional potential results.
alternative_query_results: Vec<QueryResult>
If Knowledge Connectors are enabled, there could be more than one result
returned for a given query or event, and this field will contain all
results except for the top one, which is captured in query_result. The
alternative results are ordered by decreasing
QueryResult.intent_detection_confidence
. If Knowledge Connectors are
disabled, this field will be empty until multiple responses for regular
intents are supported, at which point those additional results will be
surfaced here.
webhook_status: Option<Status>
Specifies the status of the webhook request.
output_audio: Bytes
The audio data bytes encoded as specified in the request.
Note: The output audio is generated based on the values of default platform
text responses found in the query_result.fulfillment_messages
field. If
multiple default text responses exist, they will be concatenated when
generating audio. If no default platform text responses exist, the
generated audio content will be empty.
In some scenarios, multiple output audio fields may be present in the response structure. In these cases, only the top-most-level audio output has content.
output_audio_config: Option<OutputAudioConfig>
The config used by the speech synthesizer to generate the output audio.
debugging_info: Option<CloudConversationDebuggingInfo>
Debugging info that would get populated when
StreamingDetectIntentRequest.enable_debugging_info
is set to true.
Trait Implementations§
source§impl Clone for StreamingDetectIntentResponse
impl Clone for StreamingDetectIntentResponse
source§fn clone(&self) -> StreamingDetectIntentResponse
fn clone(&self) -> StreamingDetectIntentResponse
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Message for StreamingDetectIntentResponse
impl Message for StreamingDetectIntentResponse
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 StreamingDetectIntentResponse
impl PartialEq for StreamingDetectIntentResponse
source§fn eq(&self, other: &StreamingDetectIntentResponse) -> bool
fn eq(&self, other: &StreamingDetectIntentResponse) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for StreamingDetectIntentResponse
Auto Trait Implementations§
impl !Freeze for StreamingDetectIntentResponse
impl RefUnwindSafe for StreamingDetectIntentResponse
impl Send for StreamingDetectIntentResponse
impl Sync for StreamingDetectIntentResponse
impl Unpin for StreamingDetectIntentResponse
impl UnwindSafe for StreamingDetectIntentResponse
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