:doc:`QConnect <../../qconnect>` / Client / put_feedback

************
put_feedback
************



.. py:method:: 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 <https://docs.aws.amazon.com/goto/WebAPI/qconnect-2020-10-19/PutFeedback>`_  


  **Request Syntax**
  ::

    response = client.put_feedback(
        assistantId='string',
        targetId='string',
        targetType='RECOMMENDATION'|'RESULT'|'MESSAGE',
        contentFeedback={
            'generativeContentFeedbackData': {
                'relevance': 'HELPFUL'|'NOT_HELPFUL'
            }
        }
    )
    
  :type assistantId: string
  :param assistantId: **[REQUIRED]** 

    The identifier of the Amazon Q in Connect assistant.

    

  
  :type targetId: string
  :param targetId: **[REQUIRED]** 

    The identifier of the feedback target.

    

  
  :type targetType: string
  :param targetType: **[REQUIRED]** 

    The type of the feedback target.

    

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

        

      
    
  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

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

    

    - *(dict) --* 
      

      - **assistantId** *(string) --* 

        The identifier of the Amazon Q in Connect assistant.

        
      

      - **assistantArn** *(string) --* 

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

        
      

      - **targetId** *(string) --* 

        The identifier of the feedback target.

        
      

      - **targetType** *(string) --* 

        The type of the feedback target.

        
      

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

            
      
    
  
  **Exceptions**
  
  *   :py:class:`QConnect.Client.exceptions.ValidationException`

  
  *   :py:class:`QConnect.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`QConnect.Client.exceptions.ResourceNotFoundException`

  