Skip to content

update_chat_controls_configuration async

update_chat_controls_configuration(
    application_id: ApplicationId,
    *,
    config_overrides: Optional[AsyncQBusinessClientConfig] = None,
    client_token: Optional[ClientToken] = None,
    response_scope: Optional[ResponseScope] = None,
    orchestration_configuration: Optional[OrchestrationConfiguration] = None,
    blocked_phrases_configuration_update: Optional[
        BlockedPhrasesConfigurationUpdate
    ] = None,
    topic_configurations_to_create_or_update: Optional[TopicConfigurations] = None,
    topic_configurations_to_delete: Optional[TopicConfigurations] = None,
    creator_mode_configuration: Optional[CreatorModeConfiguration] = None,
    hallucination_reduction_configuration: Optional[
        HallucinationReductionConfiguration
    ] = None,
) -> UpdateChatControlsConfigurationResponse

Updates a set of chat controls configured for an existing Amazon Q Business application.

Parameters:

  • application_id (ApplicationId) –

    The identifier of the application for which the chat controls are configured.

  • client_token (Optional[ClientToken], default: None ) –

    A token that you provide to identify the request to update a Amazon Q Business application chat configuration.

  • response_scope (Optional[ResponseScope], default: None ) –

    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.

  • orchestration_configuration (Optional[OrchestrationConfiguration], default: None ) –

    The chat response orchestration settings for your application.

  • blocked_phrases_configuration_update (Optional[BlockedPhrasesConfigurationUpdate], default: None ) –

    The phrases blocked from chat by your chat control configuration.

  • topic_configurations_to_create_or_update (Optional[TopicConfigurations], default: None ) –

    The configured topic specific chat controls you want to update.

  • topic_configurations_to_delete (Optional[TopicConfigurations], default: None ) –

    The configured topic specific chat controls you want to delete.

  • creator_mode_configuration (Optional[CreatorModeConfiguration], default: None ) –

    The configuration details for CREATOR_MODE.

  • hallucination_reduction_configuration (Optional[HallucinationReductionConfiguration], default: None ) –

    The hallucination reduction settings for your application.

Raises:

  • AccessDeniedException –

    You don't have access to perform this action. Make sure you have the required permission policies and user accounts and try again.

  • ConflictException –

    You are trying to perform an action that conflicts with the current status of your resource. Fix any inconsistencies with your resources and try again.

  • InternalServerException –

    An issue occurred with the internal server used for your Amazon Q Business service. Wait some minutes and try again, or contact Support for help.

  • ResourceNotFoundException –

    The application or plugin resource you want to use doesn’t exist. Make sure you have provided the correct resource and try again.

  • ServiceQuotaExceededException –

    You have exceeded the set limits for your Amazon Q Business service.

  • ThrottlingException –

    The request was denied due to throttling. Reduce the number of requests and try again.

  • ValidationException –

    The input doesn't meet the constraints set by the Amazon Q Business service. Provide the correct input and try again.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_qbusiness/_services/async_q_business.py
async def update_chat_controls_configuration(
    self,
    application_id: "capo_qbusiness.types.application_id.ApplicationId",
    *,
    config_overrides: Optional[AsyncQBusinessClientConfig] = None,
    client_token: Optional["capo_qbusiness.types.client_token.ClientToken"] = None,
    response_scope: Optional[
        "capo_qbusiness.types.response_scope.ResponseScope"
    ] = None,
    orchestration_configuration: Optional[
        "capo_qbusiness.types.orchestration_configuration.OrchestrationConfiguration"
    ] = None,
    blocked_phrases_configuration_update: Optional[
        "capo_qbusiness.types.blocked_phrases_configuration_update.BlockedPhrasesConfigurationUpdate"
    ] = None,
    topic_configurations_to_create_or_update: Optional[
        "capo_qbusiness.types.topic_configurations.TopicConfigurations"
    ] = None,
    topic_configurations_to_delete: Optional[
        "capo_qbusiness.types.topic_configurations.TopicConfigurations"
    ] = None,
    creator_mode_configuration: Optional[
        "capo_qbusiness.types.creator_mode_configuration.CreatorModeConfiguration"
    ] = None,
    hallucination_reduction_configuration: Optional[
        "capo_qbusiness.types.hallucination_reduction_configuration.HallucinationReductionConfiguration"
    ] = None,
) -> "capo_qbusiness.types.update_chat_controls_configuration_response.UpdateChatControlsConfigurationResponse":
    """<p>Updates a set of chat controls configured for an existing Amazon Q Business application.</p>

    Args:
        application_id: <p>The identifier of the application for which the chat controls are configured.</p>
        client_token: <p>A token that you provide to identify the request to update a Amazon Q Business application chat configuration.</p>
        response_scope: <p>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.</p>
        orchestration_configuration: <p> The chat response orchestration settings for your application.</p>
        blocked_phrases_configuration_update: <p>The phrases blocked from chat by your chat control configuration.</p>
        topic_configurations_to_create_or_update: <p>The configured topic specific chat controls you want to update.</p>
        topic_configurations_to_delete: <p>The configured topic specific chat controls you want to delete.</p>
        creator_mode_configuration: <p>The configuration details for <code>CREATOR_MODE</code>.</p>
        hallucination_reduction_configuration: <p> The hallucination reduction settings for your application.</p>

    Raises:
        capo_qbusiness.errors.access_denied_exception.AccessDeniedException: <p> You don't have access to perform this action. Make sure you have the required permission policies and user accounts and try again.</p>
        capo_qbusiness.errors.conflict_exception.ConflictException: <p>You are trying to perform an action that conflicts with the current status of your resource. Fix any inconsistencies with your resources and try again.</p>
        capo_qbusiness.errors.internal_server_exception.InternalServerException: <p>An issue occurred with the internal server used for your Amazon Q Business service. Wait some minutes and try again, or contact <a href="http://aws.amazon.com/contact-us/">Support</a> for help.</p>
        capo_qbusiness.errors.resource_not_found_exception.ResourceNotFoundException: <p>The application or plugin resource you want to use doesn’t exist. Make sure you have provided the correct resource and try again.</p>
        capo_qbusiness.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>You have exceeded the set limits for your Amazon Q Business service. </p>
        capo_qbusiness.errors.throttling_exception.ThrottlingException: <p>The request was denied due to throttling. Reduce the number of requests and try again.</p>
        capo_qbusiness.errors.validation_exception.ValidationException: <p>The input doesn't meet the constraints set by the Amazon Q Business service. Provide the correct input and try again.</p>
        capo_qbusiness.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_qbusiness.types.update_chat_controls_configuration_request.UpdateChatControlsConfigurationRequest]",
    ) -> AsyncOperationResponse[
        "capo_qbusiness.types.update_chat_controls_configuration_response.UpdateChatControlsConfigurationResponse"
    ]:
        import capo_qbusiness._operations.expert_q.update_chat_controls_configuration

        (
            output,
            http_response,
        ) = await capo_qbusiness._operations.expert_q.update_chat_controls_configuration.async_update_chat_controls_configuration(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateChatControlsConfiguration")
    )
    input_: capo_qbusiness.types.update_chat_controls_configuration_request.UpdateChatControlsConfigurationRequest = {
        "application_id": application_id
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if response_scope is not None:
        input_["response_scope"] = response_scope
    if orchestration_configuration is not None:
        input_["orchestration_configuration"] = orchestration_configuration
    if blocked_phrases_configuration_update is not None:
        input_["blocked_phrases_configuration_update"] = (
            blocked_phrases_configuration_update
        )
    if topic_configurations_to_create_or_update is not None:
        input_["topic_configurations_to_create_or_update"] = (
            topic_configurations_to_create_or_update
        )
    if topic_configurations_to_delete is not None:
        input_["topic_configurations_to_delete"] = topic_configurations_to_delete
    if creator_mode_configuration is not None:
        input_["creator_mode_configuration"] = creator_mode_configuration
    if hallucination_reduction_configuration is not None:
        input_["hallucination_reduction_configuration"] = (
            hallucination_reduction_configuration
        )

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output