Skip to content

get_quick_response

get_quick_response(
    quick_response_id: UuidOrArn,
    knowledge_base_id: UuidOrArn,
    *,
    config_overrides: Optional[WisdomClientConfig] = None,
) -> GetQuickResponseResponse

Retrieves the quick response.

Parameters:

  • quick_response_id (UuidOrArn) –

    The identifier of the quick response.

  • knowledge_base_id (UuidOrArn) –

    The identifier of the knowledge base. This should be a QUICK_RESPONSES type knowledge base.

Raises:

Source code in docs_src/capo_wisdom/_services/wisdom.py
def get_quick_response(
    self,
    quick_response_id: "capo_wisdom.types.uuid_or_arn.UuidOrArn",
    knowledge_base_id: "capo_wisdom.types.uuid_or_arn.UuidOrArn",
    *,
    config_overrides: Optional[WisdomClientConfig] = None,
) -> "capo_wisdom.types.get_quick_response_response.GetQuickResponseResponse":
    """<p>Retrieves the quick response.</p>

    Args:
        quick_response_id: <p>The identifier of the quick response.</p>
        knowledge_base_id: <p>The identifier of the knowledge base. This should be a QUICK_RESPONSES type knowledge base.</p>

    Raises:
        capo_wisdom.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_wisdom.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
        capo_wisdom.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by a service.</p>
        capo_wisdom.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_wisdom.types.get_quick_response_request.GetQuickResponseRequest]",
    ) -> OperationResponse[
        "capo_wisdom.types.get_quick_response_response.GetQuickResponseResponse"
    ]:
        import capo_wisdom._operations.wisdom_service.get_quick_response

        output, http_response = (
            capo_wisdom._operations.wisdom_service.get_quick_response.get_quick_response(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_wisdom.types.get_quick_response_response.GetQuickResponseResponse",
    ) -> dict[str, Any]:
        import capo_wisdom.types.get_quick_response_response

        return capo_wisdom.types.get_quick_response_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("GetQuickResponse", redact_output=_redact_output),
    )
    input_: capo_wisdom.types.get_quick_response_request.GetQuickResponseRequest = {
        "quick_response_id": quick_response_id,
        "knowledge_base_id": knowledge_base_id,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output