updateChatControlsConfiguration method
- required String applicationId,
- BlockedPhrasesConfigurationUpdate? blockedPhrasesConfigurationUpdate,
- String? clientToken,
- CreatorModeConfiguration? creatorModeConfiguration,
- HallucinationReductionConfiguration? hallucinationReductionConfiguration,
- OrchestrationConfiguration? orchestrationConfiguration,
- ResponseScope? responseScope,
- List<
TopicConfiguration> ? topicConfigurationsToCreateOrUpdate, - List<
TopicConfiguration> ? topicConfigurationsToDelete,
Updates a set of chat controls configured for an existing Amazon Q Business application.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter applicationId :
The identifier of the application for which the chat controls are
configured.
Parameter blockedPhrasesConfigurationUpdate :
The phrases blocked from chat by your chat control configuration.
Parameter clientToken :
A token that you provide to identify the request to update a Amazon Q
Business application chat configuration.
Parameter creatorModeConfiguration :
The configuration details for CREATOR_MODE.
Parameter hallucinationReductionConfiguration :
The hallucination reduction settings for your application.
Parameter orchestrationConfiguration :
The chat response orchestration settings for your application.
Parameter responseScope :
The response scope configured for your application. This determines
whether your application uses its retrieval augmented generation (RAG)
system to generate answers only from your enterprise data, or also uses
the large language models (LLM) knowledge to respons to end user questions
in chat.
Parameter topicConfigurationsToCreateOrUpdate :
The configured topic specific chat controls you want to update.
Parameter topicConfigurationsToDelete :
The configured topic specific chat controls you want to delete.
Implementation
Future<void> updateChatControlsConfiguration({
required String applicationId,
BlockedPhrasesConfigurationUpdate? blockedPhrasesConfigurationUpdate,
String? clientToken,
CreatorModeConfiguration? creatorModeConfiguration,
HallucinationReductionConfiguration? hallucinationReductionConfiguration,
OrchestrationConfiguration? orchestrationConfiguration,
ResponseScope? responseScope,
List<TopicConfiguration>? topicConfigurationsToCreateOrUpdate,
List<TopicConfiguration>? topicConfigurationsToDelete,
}) async {
final $payload = <String, dynamic>{
if (blockedPhrasesConfigurationUpdate != null)
'blockedPhrasesConfigurationUpdate': blockedPhrasesConfigurationUpdate,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (creatorModeConfiguration != null)
'creatorModeConfiguration': creatorModeConfiguration,
if (hallucinationReductionConfiguration != null)
'hallucinationReductionConfiguration':
hallucinationReductionConfiguration,
if (orchestrationConfiguration != null)
'orchestrationConfiguration': orchestrationConfiguration,
if (responseScope != null) 'responseScope': responseScope.value,
if (topicConfigurationsToCreateOrUpdate != null)
'topicConfigurationsToCreateOrUpdate':
topicConfigurationsToCreateOrUpdate,
if (topicConfigurationsToDelete != null)
'topicConfigurationsToDelete': topicConfigurationsToDelete,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri:
'/applications/${Uri.encodeComponent(applicationId)}/chatcontrols',
exceptionFnMap: _exceptionFns,
);
}