Skip to content

Lex Runtime V2  >  Structures  >  SentimentResponse

SentimentResponse

Structure Class

SentimentResponse dataclass

Provides information about the sentiment expressed in a user's response in a conversation. Sentiments are determined using Amazon Comprehend. Sentiments are only returned if they are enabled for the bot.

For more information, see Determine Sentiment in the Amazon Comprehend developer guide.

Attributes

sentiment class-attribute instance-attribute
sentiment: SentimentType | None = None

The overall sentiment expressed in the user's response. This is the sentiment most likely expressed by the user based on the analysis by Amazon Comprehend.

sentiment_score class-attribute instance-attribute
sentiment_score: SentimentScore | None = None

The individual sentiment responses for the utterance.