#[non_exhaustive]pub struct MessageAnalysisConfig {
pub enable_entity_extraction: bool,
pub enable_sentiment_analysis: 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.
Implementations§
Source§impl MessageAnalysisConfig
impl MessageAnalysisConfig
pub fn new() -> Self
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);Trait Implementations§
Source§impl Clone for MessageAnalysisConfig
impl Clone for MessageAnalysisConfig
Source§fn clone(&self) -> MessageAnalysisConfig
fn clone(&self) -> MessageAnalysisConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more