def as_dict(self):
        response = {
            'shouldEndSession': self.should_end_session
        }

        if self.card is not None:
            response['card'] = self.card

        if self.speech is not None:
            response['outputSpeech'] = self.speech

        if self.reprompt is not None:
            response['reprompt'] = {
                'outputSpeech': self.reprompt
            }

        return {
            'version': '1.0',
            'sessionAttributes': self.session_attributes,
            'response': response,
        }
Return response in an Alexa valid dict.
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/components/alexa.py/AlexaResponse.as_dict