QConnect / Client / put_feedback

put_feedback#

QConnect.Client.put_feedback(**kwargs)#

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

See also: AWS API Documentation

Request Syntax

response = client.put_feedback(
    assistantId='string',
    contentFeedback={
        'generativeContentFeedbackData': {
            'relevance': 'HELPFUL'|'NOT_HELPFUL'
        }
    },
    targetId='string',
    targetType='RECOMMENDATION'|'RESULT'
)
Parameters:
  • assistantId (string) –

    [REQUIRED]

    The identifier of the Amazon Q in Connect assistant.

  • contentFeedback (dict) –

    [REQUIRED]

    Information about the feedback provided.

    Note

    This is a Tagged Union structure. Only one of the following top level keys can be set: generativeContentFeedbackData.

    • generativeContentFeedbackData (dict) –

      Information about the feedback for a generative target type.

      • relevance (string) – [REQUIRED]

        The relevance of the feedback.

  • targetId (string) –

    [REQUIRED]

    The identifier of the feedback target.

  • targetType (string) –

    [REQUIRED]

    The type of the feedback target.

Return type:

dict

Returns:

Response Syntax

{
    'assistantArn': 'string',
    'assistantId': 'string',
    'contentFeedback': {
        'generativeContentFeedbackData': {
            'relevance': 'HELPFUL'|'NOT_HELPFUL'
        }
    },
    'targetId': 'string',
    'targetType': 'RECOMMENDATION'|'RESULT'
}

Response Structure

  • (dict) –

    • assistantArn (string) –

      The Amazon Resource Name (ARN) of the Amazon Q in Connect assistant.

    • assistantId (string) –

      The identifier of the Amazon Q in Connect assistant.

    • contentFeedback (dict) –

      Information about the feedback provided.

      Note

      This is a Tagged Union structure. Only one of the following top level keys will be set: generativeContentFeedbackData. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

      'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
      
      • generativeContentFeedbackData (dict) –

        Information about the feedback for a generative target type.

        • relevance (string) –

          The relevance of the feedback.

    • targetId (string) –

      The identifier of the feedback target.

    • targetType (string) –

      The type of the feedback target.

Exceptions

  • QConnect.Client.exceptions.ValidationException

  • QConnect.Client.exceptions.AccessDeniedException

  • QConnect.Client.exceptions.ResourceNotFoundException