Skip to content

put_feedback async

put_feedback(
    assistant_id: UuidOrArn,
    target_id: Uuid,
    target_type: TargetType,
    content_feedback: ContentFeedbackData,
    *,
    config_overrides: Optional[AsyncQConnectClientConfig] = None,
) -> PutFeedbackResponse

Provides feedback against the specified assistant for the specified target. This API only supports generative targets.

Parameters:

  • assistant_id (UuidOrArn) –

    The identifier of the Amazon Q in Connect assistant.

  • target_id (Uuid) –

    The identifier of the feedback target.

  • target_type (TargetType) –

    The type of the feedback target.

  • content_feedback (ContentFeedbackData) –

    Information about the feedback provided.

Raises:

Source code in docs_src/capo_qconnect/_services/async_q_connect.py
async def put_feedback(
    self,
    assistant_id: "capo_qconnect.types.uuid_or_arn.UuidOrArn",
    target_id: "capo_qconnect.types.uuid.Uuid",
    target_type: "capo_qconnect.types.target_type.TargetType",
    content_feedback: "capo_qconnect.types.content_feedback_data.ContentFeedbackData",
    *,
    config_overrides: Optional[AsyncQConnectClientConfig] = None,
) -> "capo_qconnect.types.put_feedback_response.PutFeedbackResponse":
    """<p>Provides feedback against the specified assistant for the specified target. This API only supports generative targets.</p>

    Args:
        assistant_id: <p>The identifier of the Amazon Q in Connect assistant.</p>
        target_id: <p>The identifier of the feedback target.</p>
        target_type: <p>The type of the feedback target.</p>
        content_feedback: <p>Information about the feedback provided.</p>

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

    async def _handler(
        req: "AsyncOperationRequest[capo_qconnect.types.put_feedback_request.PutFeedbackRequest]",
    ) -> AsyncOperationResponse[
        "capo_qconnect.types.put_feedback_response.PutFeedbackResponse"
    ]:
        import capo_qconnect._operations.wisdom_service.put_feedback

        (
            output,
            http_response,
        ) = await capo_qconnect._operations.wisdom_service.put_feedback.async_put_feedback(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("PutFeedback")
    )
    input_: capo_qconnect.types.put_feedback_request.PutFeedbackRequest = {
        "assistant_id": assistant_id,
        "target_id": target_id,
        "target_type": target_type,
        "content_feedback": content_feedback,
    }

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