deeppavlov/utils/alexa/conversation.py
def _generate_response(self, response: dict, request: dict) -> dict:
        """Populates generated response with additional data conforming Alexa response specification.

        Args:
            response: Raw user input extracted from Alexa request.
            request: Alexa request.
        Returns:
            response: Response conforming Alexa response specification.
        """
        response_template = deepcopy(self.response_template)
        response_template['sessionAttributes']['sessionId'] = request['session']['sessionId']

        for key, value in response_template.items():
            if key not in response.keys():
                response[key] = value

        return response
def _generate_response(self, response: dict, request: dict) -> dict:
        response_template = deepcopy(self.response_template)
        response_template['sessionAttributes']['sessionId'] = request['session']['sessionId']

        for key, value in response_template.items():
            if key not in response.keys():
                response[key] = value

        return response
def _generate_response ( self , response : dict , request : dict ) -> dict : response_template = deepcopy ( self . response_template ) response_template [ 'sessionAttributes' ] [ 'sessionId' ] = request [ 'session' ] [ 'sessionId' ] for key , value in response_template . items ( ) : if key not in response . keys ( ) : response [ key ] = value return response
Populates generated response with additional data conforming Alexa response specification.

        Args:
            response: Raw user input extracted from Alexa request.
            request: Alexa request.
        Returns:
            response: Response conforming Alexa response specification.
Populates generated response with additional data conforming Alexa response specification .