alexa-slot

How to clear custom slot value programmatically in Alexa?

允我心安 提交于 2020-03-23 07:53:21
问题 I have an Alexa skill which requires to programmatically override the values given by the user. I have tried nullifying the value and later pass it in as the "updated Intent". this.event.request.intent.userPrompt.value = null; var updatedIntent = this.event.request.intent; this.emit(':elicitSlot', 'userPrompt',"Say something","Say something", updatedIntent); However, the input JSON shows previous value. Is there a solution to this? 回答1: there is delete this.event.request.intent.slots.

How to make an asynchronous api call for Alexa Skill application with a Lambda function?

自闭症网瘾萝莉.ら 提交于 2019-12-24 08:00:07
问题 I want to call an api from a Lambda function. My handler is triggered by an intent which includes two required slots. Therefore I don't know in advance whether I will be returning a Dialog.Delegate directive or my response from the api request. How do I promise these return values by the time the intent handler is called? This is my handler: const FlightDelayIntentHandler = { canHandle(handlerInput) { return handlerInput.requestEnvelope.request.type === 'IntentRequest' && handlerInput

How to add slot values dynamically to alexa skill

旧城冷巷雨未停 提交于 2019-12-24 00:54:49
问题 I am new in Alexa development. I have successfully create an Alexa skill with AWS lambda function and Node.js code. This is my intent schema. { "intents": [ { "slots": [ { "name": "locationName", "type": "LOCATION_LIST" } ], "intent": "locationIntent" } ] } Also I have used custom slot type "LOCATION_LIST" with following values. kitchen bedroom bathroom dining area It's working fine. But I need to add more location values dynamically from my own service. Is it possible? Based on my system

Alexa Dialog Model Step and dialogState is never in COMPLETED

*爱你&永不变心* 提交于 2019-12-23 05:15:52
问题 I'm implementing an Alexa Dialog Model with an PHP Endpoint. I used the Alexa doc (https://developer.amazon.com/fr/docs/custom-skills/dialog-interface-reference.html) Here is my example: My skill: RequestIntent Utterance : add an {obj} in the bedroom Slots : {obj} / Slot Filling Phrase: Me : Alexa, Add an object in the bedroom Alexa : What object do you want to add in bedroom ? Me : I would like to add a cars in the bedroom Alexa : You want to add a car in the bedroom ? Me : Yes STEP1:

how to design mobile card in alexa

╄→尐↘猪︶ㄣ 提交于 2019-12-11 17:14:46
问题 I have developed an app and it is functioning properly, however when it comes to designing, i am unable to achieve what is given in the example despite of doing the same code in the example. I want to achieve this design where image is in the center with title above and description down but what I am getting is this, side image, side title and description down. Please let me know how to achieve that. Here is my sample of my code "response" : { "outputSpeech" : { "type" : "SSML", "ssml" : "

Alexa skill, custom slot - date and time

谁都会走 提交于 2019-12-11 15:45:57
问题 I've created a skill and i want to be able to call upon a machine state at a certain date and time from my dynamo db table. my first column is date and my sort key is time. Would i need to create a custom slot for date with all 365 daysof the year or is there a quicker way to do this? Also would i need to create a custom slot for every minute of the day. Code: var AWSregion = 'us-east-1'; // us-east-1 var AWS = require('aws-sdk'); var dbClient = new AWS.DynamoDB.DocumentClient(); AWS.config

Lex AMAZON.DATE issue

别等时光非礼了梦想. 提交于 2019-12-11 07:28:18
问题 I am using lex built-in slot AMAZON.DATE. the problem is when user types 'today' it interprets time as local time. I think it is N.Virginia time where lex is hosted. For example, when user types today (today is 1 Nov in Australia) but lex sends the value as 31/10. Is there a way we can set a different time zone in the lex ? 回答1: To set the time zone used to resolve dates so that it is relative to the user's time zone, use the x-amz-lex:time-zone request attribute. If you do not specify a time

My custom slot type is taking on unexpected values

落爺英雄遲暮 提交于 2019-12-08 21:59:40
问题 I noticed something strange when testing my interaction model with the Alexa skills kit. I defined a custom slot type, like so: CAR_MAKERS Mercedes | BMW | Volkswagen And my intent scheme was something like: { "intents": [ { "intent": "CountCarsIntent", "slots": [ { "name": "CarMaker", "type": "CAR_MAKERS" }, ... with sample utterances such as: CountCarsIntent Add {Amount} cars to {CarMaker} Now, when testing in the developer console, I noticed that I can write stuff like: "Add three cars to

Amazon Alexa - How to create Generic Slot

浪尽此生 提交于 2019-12-07 06:54:53
问题 How can I create a generic slot for an Alexa skill? So that I can create my own Todo app and it will recognise the free form text. 回答1: The Alexa blog announced a List Skill API. As mentioned above, the literal slot type is no longer supported for new skills. If you create a custom slot with a number of values - depending on your expected response values with a single word or 2+ words - Alexa will catch also spoken words not on the list and pass them to your skill. Transcription of these

How to return Dialog.Delegate directive to Alexa Skill model?

假如想象 提交于 2019-12-07 06:04:03
问题 I want to create a simple multi-turn dialog with the Alexa Skill model. My intent consists of 3 slots, each of which are required to fulfill the intent. I prompt every slot and defined all of the needed utterances. Now I want to handle the request with a Lambda function. This is my function for this specific Intent: function getData(intentRequest, session, callback) { if (intentRequest.dialogState != "COMPLETED"){ // return a Dialog.Delegate directive with no updatedIntent property. } else {