Example #1
0
def vegetables_intent_handler(handler_input):
    speechText = 'A vegetable is a part of a plant consumed by humans that is generally savory but is not sweet. A vegetable is not considered a grain, fruit, nut, spice, or herb.'

    return (handler_input.response_builder.speak(speechText).ask(
        speechText).set_card(
            SimpleCard("Vegetables - Food Pyramid", speechText)).add_directive(
                RenderDocumentDirective(document=_load_apl_document(
                    "lambda/custom/vegetables.json"))).response)
Example #2
0
    def handle(self, handler_input):
        # type: (HandlerInput) -> Response
        speech_text = "Welcome to NSE Stocks skill!"

        handler_input.response_builder.speak(speech_text).set_card(
            SimpleCard("NSE Stocks",
                       speech_text)).set_should_end_session(False)
        return handler_input.response_builder.response
Example #3
0
    def handle(self, handler_input):
        # type: (HandlerInput) -> Response
        speech_text = ""

        handler_input.response_builder.speak(speech_text).set_card(
            SimpleCard("under the sea",
                       speech_text)).set_should_end_session(True)
        return handler_input.response_builder.response
    def handle(self, handler_input):
        # type: (HandlerInput) -> Response
        speak_output = "Select a country to start a meal plan"
        card_title = "Help"
        card_text = speak_output

        return (handler_input.response_builder.speak(speak_output).ask(
            speak_output).set_card(SimpleCard(card_title, card_text)).response)
Example #5
0
    def handle(self, handler_input):
        # type: (HandlerInput) -> Response
        speech_text = "Goodbye!"

        handler_input.response_builder.speak(speech_text).set_card(
            SimpleCard("Hello World",
                       speech_text)).set_should_end_session(True)
        return handler_input.response_builder.response
    def handle(self, handler_input, exception):
        print(exception)

        speech = "Sorry there's a bug on my skill. Go blame the Developer!"
        
        handler_input.response_builder.speak(speech).set_card(
            SimpleCard(speech)).set_should_end_session(True)
        return handler_input.response_builder.response
    def handle(self, handler_input):
        # type: (HandlerInput) -> Response
        logger.info("In HelpIntentHandler")

        handler_input.response_builder.speak(HELP_MESSAGE).ask(
            HELP_REPROMPT).set_card(SimpleCard(
                SKILL_NAME, HELP_MESSAGE))
        return handler_input.response_builder.response
Example #8
0
	def handle(self, handler_input):
		# type: (HandlerInput) -> Response
		speech_text = "This is a fun skill that will create anagrams of words provided by the user.  Simply tell us a word when prompted and we will give you an example of an anagram of that word.  What word would you like to hear  an anagram of?"
		reprompt = "Would you like me to search for an anagram of a word?"
		handler_input.response_builder.speak(speech_text).ask(
			reprompt).set_card(SimpleCard(
				"Anagram Mkaker 2.0", speech_text)).set_should_end_session(False)
		return handler_input.response_builder.response
    def handle(self, handler_input):
        # type: (HandlerInput) -> Response
        logger.info("In LaunchRequestHandler")

        (handler_input.response_builder.speak(strings.WELCOME_MESSAGE).ask(
            strings.HELP_REPROMPT).set_card(
                SimpleCard(strings.SKILL_NAME, strings.HELP_MESSAGE)))
        return handler_input.response_builder.response
Example #10
0
def fats_intent_handler(handler_input):
    speechText = 'These foods provide calories, but not much nutrition. These foods include salad dressings, sugars, soft drinks, candies, and desserts.'

    return (handler_input.response_builder.speak(
        speechText).ask(speechText).set_card(
            SimpleCard("Fats - Food Pyramid", speechText)).add_directive(
                RenderDocumentDirective(document=_load_apl_document(
                    "lambda/custom/fats.json"))).response)
Example #11
0
    def handle(self, handler_input):
        # type: (HandlerInput) -> Response
        speech_text = "I'm Cloud Control. By using proper command you can \
            manage AWS EC2 resources."

        handler_input.response_builder.speak(speech_text).ask(
            speech_text).set_card(SimpleCard("Cloud Control", speech_text))
        return handler_input.response_builder.response
Example #12
0
def meats_intent_handler(handler_input):
    speechText = 'Meat is the tissue – usually muscle – of an animal consumed by humans. Since most parts of many animals are edible, there is a vast variety of meats.'

    return (handler_input.response_builder.speak(
        speechText).ask(speechText).set_card(
            SimpleCard("Meats - Food Pyramid", speechText)).add_directive(
                RenderDocumentDirective(document=_load_apl_document(
                    "lambda/custom/meats.json"))).response)
Example #13
0
def dairy_intent_handler(handler_input):
    speechText = 'Dairy products are produced from the milk of mammals. They include milk, yogurt and cheese.'

    return (handler_input.response_builder.speak(
        speechText).ask(speechText).set_card(
            SimpleCard("Dairy - Food Pyramid", speechText)).add_directive(
                RenderDocumentDirective(document=_load_apl_document(
                    "lambda/custom/dairy.json"))).response)
Example #14
0
def fruits_intent_handler(handler_input):
    speechText = 'Fruits are the sweet-tasting seed-bearing parts of plants, or occasionally sweet parts of plants which do not bear seeds.'

    return (handler_input.response_builder.speak(
        speechText).ask(speechText).set_card(
            SimpleCard("Fruits - Food Pyramid", speechText)).add_directive(
                RenderDocumentDirective(document=_load_apl_document(
                    "lambda/custom/fruits.json"))).response)
Example #15
0
    def handle(self, handler_input):
        # type: (HandlerInput) -> Response
        speech_text = "You can say hello to me!"

        handler_input.response_builder.speak(speech_text).ask(
            speech_text).set_card(SimpleCard(
                "Hello World", speech_text))
        return handler_input.response_builder.response
Example #16
0
    def handle(self, handler_input):
        # type: (HandlerInput) -> Response
        speech_text = youCanAskFor

        handler_input.response_builder.speak(speech_text).ask(
            speech_text).set_card(SimpleCard(
                skillName, speech_text))
        return handler_input.response_builder.response
 def handle(self, handler_input):
     speech = "So you like Chuck Norris. Let me give you a random fact."
     speech += getChuckFact()
     speech += ". Do you want more awesome Chuck facts?"
     
     handler_input.response_builder.speak(speech).set_card(
         SimpleCard(speech)).set_should_end_session(False)
     return handler_input.response_builder.response
Example #18
0
def roll_die_intent_handler(handler_input):
    speech_text = random.choice(facts)

    card_title = 'Fact: '

    handler_input.response_builder.speak(speech_text).set_card(
        SimpleCard(card_title, speech_text)).set_should_end_session(True)
    return handler_input.response_builder.response
 def handle(self, handler_input):
     speech = "If you want more Chuck Norris facts. You can say Yes, 'A "
     speech += "random fact' or 'A category fact'. If you want me to stop"
     speech += "just say 'Goodbye' or 'Stop'."
     
     handler_input.response_builder.speak(speech).set_card(
         SimpleCard(speech)).set_should_end_session(False)
     return handler_input.response_builder.response
Example #20
0
def help_intent_handler(handler_input):

    speech_text = 'You can ask me to tell a fact about Mumbai'

    handler_input.response_builder.speak(speech_text).set_card(
        SimpleCard('Help', speech_text)).set_should_end_session(False)

    return handler_input.response_builder.response
Example #21
0
    def handle(self, handler_input):
        # type: (HandlerInput) -> Response
        speech_text = "Welcome Blackperl. You can say Hello or You can ask me- Status Report, Relanuching a new VM. Which one you woule like to try?"

        handler_input.response_builder.speak(speech_text).set_card(
            SimpleCard("Hello World",
                       speech_text)).set_should_end_session(False)
        return handler_input.response_builder.response
Example #22
0
def launch_request_handler(handler_input):
    # """Handler for Skill Launch."""
    # type: (HandlerInput) -> Response
    speech_text = "Move plan is an Alexa skill and is live, you can say hello!"

    return handler_input.response_builder.speak(speech_text).set_card(
        SimpleCard("Hello World",
                   speech_text)).set_should_end_session(False).response
Example #23
0
    def handle(self, handler_input):
        # type: (HandlerInput) -> Response
        speech_text = 'Skill em desenvolvimento'

        handler_input.response_builder.speak(speech_text).set_card(
            SimpleCard("Hello World",
                       speech_text)).set_should_end_session(False)
        return handler_input.response_builder.response
def launch_request_handler(handler_input):
    """Handler for Skill Launch."""
    # type: (HandlerInput) -> Response
    speech_text = "Welcome to the Alexa Skills Kit, you can say hello!"

    return handler_input.response_builder.speak(speech_text).set_card(
        SimpleCard("Hello World",
                   speech_text)).set_should_end_session(False).response
Example #25
0
    def handle(self, handler_input):
        speech_text = speech.LAUNCH_SPEECH_TEXT

        handler_input.response_builder.speak(speech_text).set_card(
            SimpleCard("SolarEdge Energy Monitoring", speech_text))\
            .set_should_end_session(
            False)
        return handler_input.response_builder.response
def hello_world_intent_handler(handler_input):
    """Handler for Hello World Intent."""
    # type: (HandlerInput) -> Response
    speech_text = "Hello Python World from Decorators!"

    return handler_input.response_builder.speak(speech_text).set_card(
        SimpleCard("Hello World",
                   speech_text)).set_should_end_session(True).response
Example #27
0
    def handle(self, handler_input):
        # type: (HandlerInput) -> Response
        speech_text = "Welcome to under the sea! The sea is full of wonderful creatures living in peace and harmony. You can ask me about the differant kinds of sea animals."

        handler_input.response_builder.speak(speech_text).set_card(
            SimpleCard("under the sea",
                       speech_text)).set_should_end_session(False)
        return handler_input.response_builder.response
Example #28
0
 def handle(self, handler_input):
     # type (HandlerInput) -> Response
     # Text that is outputted when LaunchRequest is invoked
     speech_text = "Welcome to the Adelphi Calendar skill, ask any question pertaining to the Adelphi calendar."
     # Generates the response
     handler_input.response_builder.speak(speech_text).set_card(
         SimpleCard("Hello World", speech_text)).set_should_end_session(False)
     return handler_input.response_builder.response
    def handle(self, handler_input):
        # type: (HandlerInput) -> Response
        speech_text = "Welcome to the Alexa Skills Kit, you can say hello!"

        handler_input.response_builder.speak(speech_text).set_card(
            SimpleCard("Hello World", speech_text)).set_should_end_session(
            False)
        return handler_input.response_builder.response
Example #30
0
def grains_intent_handler(handler_input):
    speechText = 'These foods provide complex carbohydrates, which are a ' \
                 'good source of energy but provide little nutrition.'
    return (handler_input.response_builder.speak(
        speechText).ask(speechText).set_card(
            SimpleCard("Grains - Food Pyramid", speechText)).add_directive(
                RenderDocumentDirective(document=_load_apl_document(
                    "lambda/custom/grains.json"))).response)