list_aggregated_utterances
¶
list_aggregated_utterances(
bot_id: Id,
locale_id: LocaleId,
aggregation_duration: UtteranceAggregationDuration,
*,
config_overrides: Optional[LexModelsV2ClientConfig] = None,
bot_alias_id: Optional[BotAliasId] = None,
bot_version: Optional[BotVersion] = None,
sort_by: Optional[AggregatedUtterancesSortBy] = None,
filters: Optional[AggregatedUtterancesFilters] = None,
max_results: Optional[MaxResults] = None,
next_token: Optional[NextToken] = None,
) -> ListAggregatedUtterancesResponse
Provides a list of utterances that users have sent to the bot.
Utterances are aggregated by the text of the utterance. For example, all instances where customers used the phrase "I want to order pizza" are aggregated into the same line in the response.
You can see both detected utterances and missed utterances. A detected utterance is where the bot properly recognized the utterance and activated the associated intent. A missed utterance was not recognized by the bot and didn't activate an intent.
Utterances can be aggregated for a bot alias or for a bot version, but not both at the same time.
Utterances statistics are not generated under the following conditions:
-
The
childDirectedfield was set to true when the bot was created. -
You are using slot obfuscation with one or more slots.
-
You opted out of participating in improving Amazon Lex.
Parameters:
-
bot_id(Id) –The unique identifier of the bot associated with this request.
-
bot_alias_id(Optional[BotAliasId], default:None) –The identifier of the bot alias associated with this request. If you specify the bot alias, you can't specify the bot version.
-
bot_version(Optional[BotVersion], default:None) –The identifier of the bot version associated with this request. If you specify the bot version, you can't specify the bot alias.
-
locale_id(LocaleId) –The identifier of the language and locale where the utterances were collected. For more information, see Supported languages.
-
aggregation_duration(UtteranceAggregationDuration) –The time window for aggregating the utterance information. You can specify a time between one hour and two weeks.
-
sort_by(Optional[AggregatedUtterancesSortBy], default:None) –Specifies sorting parameters for the list of utterances. You can sort by the hit count, the missed count, or the number of distinct sessions the utterance appeared in.
-
filters(Optional[AggregatedUtterancesFilters], default:None) –Provides the specification of a filter used to limit the utterances in the response to only those that match the filter specification. You can only specify one filter and one string to filter on.
-
max_results(Optional[MaxResults], default:None) –The maximum number of utterances to return in each page of results. If there are fewer results than the maximum page size, only the actual number of results are returned. If you don't specify the
maxResultsparameter, 1,000 results are returned. -
next_token(Optional[NextToken], default:None) –If the response from the
ListAggregatedUtterancesoperation contains more results that specified in themaxResultsparameter, a token is returned in the response. Use that token in thenextTokenparameter to return the next page of results.
Raises:
-
InternalServerException–The service encountered an unexpected condition. Try your request again.
-
PreconditionFailedException–Your request couldn't be completed because one or more request fields aren't valid. Check the fields in your request and try again.
-
ThrottlingException–Your request rate is too high. Reduce the frequency of requests.
-
ValidationException–One of the input parameters in your request isn't valid. Check the parameters and try your request again.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_lex_models_v2/_services/lex_models_v2.py
3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 | |