:doc:`LexModelsV2 <../../lexv2-models>` / Client / list_test_set_records

*********************
list_test_set_records
*********************



.. py:method:: LexModelsV2.Client.list_test_set_records(**kwargs)

  

  The list of test set records.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/ListTestSetRecords>`_  


  **Request Syntax**
  ::

    response = client.list_test_set_records(
        testSetId='string',
        maxResults=123,
        nextToken='string'
    )
    
  :type testSetId: string
  :param testSetId: **[REQUIRED]** 

    The identifier of the test set to list its test set records.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of test set records to return in each page. If there are fewer records than the max page size, only the actual number of records are returned.

    

  
  :type nextToken: string
  :param nextToken: 

    If the response from the ListTestSetRecords operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.

    

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

    
    ::

      {
          'testSetRecords': [
              {
                  'recordNumber': 123,
                  'conversationId': 'string',
                  'turnNumber': 123,
                  'turnSpecification': {
                      'agentTurn': {
                          'agentPrompt': 'string'
                      },
                      'userTurn': {
                          'input': {
                              'utteranceInput': {
                                  'textInput': 'string',
                                  'audioInput': {
                                      'audioFileS3Location': 'string'
                                  }
                              },
                              'requestAttributes': {
                                  'string': 'string'
                              },
                              'sessionState': {
                                  'sessionAttributes': {
                                      'string': 'string'
                                  },
                                  'activeContexts': [
                                      {
                                          'name': 'string'
                                      },
                                  ],
                                  'runtimeHints': {
                                      'slotHints': {
                                          'string': {
                                              'string': {
                                                  'runtimeHintValues': [
                                                      {
                                                          'phrase': 'string'
                                                      },
                                                  ],
                                                  'subSlotHints': {'... recursive ...'}
                                              }
                                          }
                                      }
                                  }
                              }
                          },
                          'expected': {
                              'intent': {
                                  'name': 'string',
                                  'slots': {
                                      'string': {
                                          'value': 'string',
                                          'values': [
                                              {'... recursive ...'},
                                          ],
                                          'subSlots': {'... recursive ...'}
                                      }
                                  }
                              },
                              'activeContexts': [
                                  {
                                      'name': 'string'
                                  },
                              ],
                              'transcript': 'string'
                          }
                      }
                  }
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **testSetRecords** *(list) --* 

        The list of records from the test set.

        
        

        - *(dict) --* 

          Contains information about a turn in a test set.

          
          

          - **recordNumber** *(integer) --* 

            The record number associated with the turn.

            
          

          - **conversationId** *(string) --* 

            The unique identifier for the conversation associated with the turn.

            
          

          - **turnNumber** *(integer) --* 

            The number of turns that has elapsed up to that turn.

            
          

          - **turnSpecification** *(dict) --* 

            Contains information about the agent or user turn depending upon type of turn.

            
            

            - **agentTurn** *(dict) --* 

              Contains information about the agent messages in the turn.

              
              

              - **agentPrompt** *(string) --* 

                The agent prompt for the agent turn in a test set.

                
          
            

            - **userTurn** *(dict) --* 

              Contains information about the user messages in the turn.

              
              

              - **input** *(dict) --* 

                Contains information about the user messages in the turn in the input.

                
                

                - **utteranceInput** *(dict) --* 

                  The utterance input in the user turn.

                  
                  

                  - **textInput** *(string) --* 

                    A text input transcription of the utterance. It is only applicable for test-sets containing text data.

                    
                  

                  - **audioInput** *(dict) --* 

                    Contains information about the audio input for an utterance.

                    
                    

                    - **audioFileS3Location** *(string) --* 

                      Amazon S3 file pointing to the audio.

                      
                
              
                

                - **requestAttributes** *(dict) --* 

                  Request attributes of the user turn.

                  
                  

                  - *(string) --* 
                    

                    - *(string) --* 
              
            
                

                - **sessionState** *(dict) --* 

                  Contains information about the session state in the input.

                  
                  

                  - **sessionAttributes** *(dict) --* 

                    Session attributes for the session state.

                    
                    

                    - *(string) --* 
                      

                      - *(string) --* 
                
              
                  

                  - **activeContexts** *(list) --* 

                    Active contexts for the session state.

                    
                    

                    - *(dict) --* 

                      The active context used in the test execution.

                      
                      

                      - **name** *(string) --* 

                        The name of active context.

                        
                  
                
                  

                  - **runtimeHints** *(dict) --* 

                    Runtime hints for the session state.

                    
                    

                    - **slotHints** *(dict) --* 

                      A list of the slots in the intent that should have runtime hints added, and the phrases that should be added for each slot.

                       

                      The first level of the ``slotHints`` map is the name of the intent. The second level is the name of the slot within the intent. For more information, see `Using hints to improve accuracy <https://docs.aws.amazon.com/lexv2/latest/dg/using-hints.html>`__.

                       

                      The intent name and slot name must exist.

                      
                      

                      - *(string) --* 
                        

                        - *(dict) --* 
                          

                          - *(string) --* 
                            

                            - *(dict) --* 

                              Provides an array of phrases that should be given preference when resolving values for a slot.

                              
                              

                              - **runtimeHintValues** *(list) --* 

                                One or more strings that Amazon Lex should look for in the input to the bot. Each phrase is given preference when deciding on slot values.

                                
                                

                                - *(dict) --* 

                                  Provides the phrase that Amazon Lex should look for in the user's input to the bot.

                                  
                                  

                                  - **phrase** *(string) --* 

                                    The phrase that Amazon Lex should look for in the user's input to the bot.

                                    
                              
                            
                              

                              - **subSlotHints** *(dict) --* 

                                A map of constituent sub slot names inside a composite slot in the intent and the phrases that should be added for each sub slot. Inside each composite slot hints, this structure provides a mechanism to add granular sub slot phrases. Only sub slot hints are supported for composite slots. The intent name, composite slot name and the constituent sub slot names must exist.

                                
                          
                      
                    
                  
                
                
              
            
              

              - **expected** *(dict) --* 

                Contains results about the expected output for the user turn.

                
                

                - **intent** *(dict) --* 

                  Contains information about the intent.

                  
                  

                  - **name** *(string) --* 

                    The name of the intent.

                    
                  

                  - **slots** *(dict) --* 

                    The slots associated with the intent.

                    
                    

                    - *(string) --* 
                      

                      - *(dict) --* 

                        Contains information about a slot output by the test set execution.

                        
                        

                        - **value** *(string) --* 

                          The value output by the slot recognition.

                          
                        

                        - **values** *(list) --* 

                          Values that are output by the slot recognition.

                          
                          

                          - *(dict) --* 

                            Contains information about a slot output by the test set execution.

                            
                      
                        

                        - **subSlots** *(dict) --* 

                          A list of items mapping the name of the subslots to information about those subslots.

                          
                    
                
              
              
                

                - **activeContexts** *(list) --* 

                  The contexts that are active in the turn.

                  
                  

                  - *(dict) --* 

                    The active context used in the test execution.

                    
                    

                    - **name** *(string) --* 

                      The name of active context.

                      
                
              
                

                - **transcript** *(string) --* 

                  The transcript that is output for the user turn by the test execution.

                  
            
          
        
      
    
      

      - **nextToken** *(string) --* 

        A token that indicates whether there are more records to return in a response to the ListTestSetRecords operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListTestSetRecords operation request to get the next page of records.

        
  
  **Exceptions**
  
  *   :py:class:`LexModelsV2.Client.exceptions.ThrottlingException`

  
  *   :py:class:`LexModelsV2.Client.exceptions.ServiceQuotaExceededException`

  
  *   :py:class:`LexModelsV2.Client.exceptions.ValidationException`

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

  
  *   :py:class:`LexModelsV2.Client.exceptions.InternalServerException`

  