#[non_exhaustive]pub struct MessageAnalysisConfig {
pub enable_entity_extraction: bool,
pub enable_sentiment_analysis: bool,
pub enable_sentiment_analysis_v3: bool,
/* private fields */
}conversation-profiles or conversations only.Expand description
Configuration for analyses to run on each conversation message.
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.enable_entity_extraction: boolEnable entity extraction in conversation messages on agent assist stage. If unspecified, defaults to false.
Currently, this feature is not general available, please contact Google to get access.
enable_sentiment_analysis: boolEnable sentiment analysis in conversation messages on agent assist stage. If unspecified, defaults to false. Sentiment analysis inspects user input and identifies the prevailing subjective opinion, especially to determine a user’s attitude as positive, negative, or neutral: https://cloud.google.com/natural-language/docs/basics#sentiment_analysis For [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent] method, result will be in StreamingAnalyzeContentResponse.message.SentimentAnalysisResult. For Participants.AnalyzeContent method, result will be in AnalyzeContentResponse.message.SentimentAnalysisResult For Conversations.ListMessages method, result will be in ListMessagesResponse.messages.SentimentAnalysisResult If Pub/Sub notification is configured, result will be in ConversationEvent.new_message_payload.SentimentAnalysisResult.
enable_sentiment_analysis_v3: boolOptional. Enables sentiment analysis for audio input and conversation messages. If unspecified, defaults to false. If this flag is set to true, other ‘enable_sentiment_analysis’ fields will be ignored.
Sentiment analysis inspects user input and identifies the prevailing subjective opinion, especially to determine a user’s attitude as positive, negative, or neutral. https://cloud.google.com/natural-language/docs/basics#sentiment_analysis For [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent] method, result will be in StreamingAnalyzeContentResponse.message.SentimentAnalysisResult. For Participants.AnalyzeContent method, result will be in AnalyzeContentResponse.message.SentimentAnalysisResult For Conversations.ListMessages method, result will be in ListMessagesResponse.messages.SentimentAnalysisResult If Pub/Sub notification is configured, result will be in ConversationEvent.new_message_payload.SentimentAnalysisResult.
Implementations§
Source§impl MessageAnalysisConfig
impl MessageAnalysisConfig
Sourcepub fn set_enable_entity_extraction<T: Into<bool>>(self, v: T) -> Self
pub fn set_enable_entity_extraction<T: Into<bool>>(self, v: T) -> Self
Sets the value of enable_entity_extraction.
§Example
let x = MessageAnalysisConfig::new().set_enable_entity_extraction(true);Sourcepub fn set_enable_sentiment_analysis<T: Into<bool>>(self, v: T) -> Self
pub fn set_enable_sentiment_analysis<T: Into<bool>>(self, v: T) -> Self
Sets the value of enable_sentiment_analysis.
§Example
let x = MessageAnalysisConfig::new().set_enable_sentiment_analysis(true);Sourcepub fn set_enable_sentiment_analysis_v3<T: Into<bool>>(self, v: T) -> Self
pub fn set_enable_sentiment_analysis_v3<T: Into<bool>>(self, v: T) -> Self
Sets the value of enable_sentiment_analysis_v3.
§Example
let x = MessageAnalysisConfig::new().set_enable_sentiment_analysis_v3(true);Trait Implementations§
Source§impl Clone for MessageAnalysisConfig
impl Clone for MessageAnalysisConfig
Source§fn clone(&self) -> MessageAnalysisConfig
fn clone(&self) -> MessageAnalysisConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MessageAnalysisConfig
impl Debug for MessageAnalysisConfig
Source§impl Default for MessageAnalysisConfig
impl Default for MessageAnalysisConfig
Source§fn default() -> MessageAnalysisConfig
fn default() -> MessageAnalysisConfig
Source§impl Message for MessageAnalysisConfig
impl Message for MessageAnalysisConfig
Source§impl PartialEq for MessageAnalysisConfig
impl PartialEq for MessageAnalysisConfig
impl StructuralPartialEq for MessageAnalysisConfig
Auto Trait Implementations§
impl Freeze for MessageAnalysisConfig
impl RefUnwindSafe for MessageAnalysisConfig
impl Send for MessageAnalysisConfig
impl Sync for MessageAnalysisConfig
impl Unpin for MessageAnalysisConfig
impl UnsafeUnpin for MessageAnalysisConfig
impl UnwindSafe for MessageAnalysisConfig
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