Amazon Q Connect

2023/12/01 - Amazon Q Connect - 1 new api methods

Changes  This release adds the PutFeedback API and allows providing feedback against the specified assistant for the specified target.

PutFeedback (new) Link ΒΆ

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

See also: AWS API Documentation

Request Syntax

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

string

param assistantId

[REQUIRED]

The identifier of the Amazon Q assistant.

type contentFeedback

dict

param contentFeedback

[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.

type targetId

string

param targetId

[REQUIRED]

The identifier of the feedback target.

type targetType

string

param targetType

[REQUIRED]

The type of the feedback target.

rtype

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 assistant.

    • assistantId (string) --

      The identifier of the Amazon Q 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.