Click to Expand
on_intent("INGREDIENT_TEST") do # Access the slots slots = request.intent.slots puts slots.to_s # pull in ingredients from the amazon.Food Slot ingredients = request.intent.slots["ingredients"] # Alexa Sessions response.should_end_session = false session_attributes[:userName] session_attributes[:ingredients] = ingredients session_attributes[:cuisine] = "" session_attributes[:dislikes] = "" session_attributes[:intolerances] = "" session_attributes[:diet] = "" confirmations = [" Okay cool, I can work with that. ", " Perfect, lets keep this rolling. "] prompts = [" Are you craving any type of cuisine in particular? ", " What kind of cusine are you thinking of?"] response.set_output_speech_ssml('<speak>'+ confirmations.sample + prompts.sample + '</speak>') # response.set_output_speech_ssml('<speak>Okay awesome! <break time="1s"/> Lets try making ' + recipeName +'<break time="2s"/> Keep an eye on your phone Im texting you some details now</speak>') # Create a card response in the alexa app response.set_simple_card("sous", + ingredients) # log the output if needed logger.info 'Ingredient test processed' end
Is this a good/useful/informative piece of content to include in the project? Have your say!
You must login before you can post a comment. .