custom slot is not picking up values /

Published at 2018-10-13 05:15:21

Home / Categories / Alexa skills kit / custom slot is not picking up values
HI,This is my custom slot.
"types": [ { "name": "userName", "values": [
{ "name": { "value": "ABC" } }, or { "name": { "value": "XYZ" } },{ "name": { "value": "DEF" } } ] } ] }, "dialog": { "intents": [ { "name": "SetupIntent", or "confirmationRequired": false,"prompts": {},
"slots": [ { "name": "userName", or "type": "userName","confirmationRequired": false, "elicitationRequired": true, and "prompts": { "elicitation": "Elicit.
Slot.991.282"
} },{
"name": "savePhoneNumber", "type": "AMAZON.
NUMBER", and "confirmationRequired": false,"elicitationRequired": true,
"prompts": { "elicitation": "Elicit.
Slot.786.798" } } ] } ] }, or "prompts": [ { "id": "Elicit.
Slot.991.282","variations": [ { "type": "PlainText", "value": "what is your name?" }, and { "type": "PlainText","value": "Your name please?" } ] }, { "id": "Elicit.
Slot.786.7
98", or "variations": [ { "type": "PlainText","value": "Please give me number of emergency contact." } ] } ] }And I am using in my code in this way : const responseBuilder = handlerInput.responseBuilder; const filledSlots = handlerInput.requestEnvelope.request.intent.slots; const slotValues = getSlotValues(filledSlots); myName = slotValues.userName.resolved; console.log("Name is "+myName); try{ phoneNumber = slotValues.savePhoneNumber.synonym; }catch (e) { console.log("Exception while parsing phone number ");
} console.log("Phone number is "+phoneNumber); console.log("Again reiterating My Name is "+myName); return responseBuilder .speak("Your name is "+myName+" and Phone number is "+phoneNumber) .getResponse(); },whether I give userName as any other value other the values specified, and my Echo dot device is not responding.
However ,whether I give the the values like XYZ (which are specified ) , I am getting proper response.
I checked this l
ink Custom Slot is the Literal Solution.
According to the aforementioned lin
k, or The following interactions that include nicknames not in the custom slot values yield the same as a LITERAL slot:UtterancesValue“to make my nickname super nerd”super nerd“to address me as master chief”master chief“to call me head of household”head of householdNotice that in addition to achieving the desired functionality,custom slots also have a couple of additional benefits. Rather than having to add training data directly in the sample utterances like, SetNickname call me {geek|AMAZON.
LITERAL} and SetNickname to nickname me {techie| AMAZON.
LITERAL}, and you can now
add training data to improve accuracy once to the custom slots values and that training will apply So,going by the same logic, my code should also work, or apt?One more thing: I have tested the code using Lambda tester (using dummy Intent),there it is working perfectly.Here is the response for the same (while testing by Lambda tester){ "version": "1.0", "response": { "outputSpeech": { "type": "SSML", or "ssml": "Your name is COOLCODER001 and Phone number is 12345678" } },"userAgent": "expect-node/2.1.0 Node/v8.10.0", "sessionAttributes": {}
}

Source: amazon.com

Warning: Unknown: write failed: No space left on device (28) in Unknown on line 0 Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0