我正在建立一种技能,要求用户说明他的出生日期。
他可以为此提出一些例子
- September twenty fifth nineteen eighty seven
- Fourth January nineteen ninety
- Four January two thousand four
- Four January two zero zero four
- March Fifteen two thousand one
我使用了AMAZON.DATE作为插槽。 Alexa未能在事实上解决日期,它无法自行解决意图并且其响应总是
"I don't know that one"
下面的是我用于此意图的示例话语
DateOfBirth my date of birth is {dob}
DateOfBirth {dob} is my date of Birth
DateOfBirth {dob} is my birth date
DateOfBirth birth date is {dob}
DateOfBirth it is {dob}
DateOfBirth {dob}
我该怎么做才能让它发挥作用?
答案 0 :(得分:0)
根据alexa文档,类型插槽AMAZON.date仅接受当前日期或之后的日期。所以这里的所有示例都不起作用。有关完整文档,请访问this url
答案 1 :(得分:0)
我不认为这是问题的日期插槽。我有一个使用日期时段的技能,当我输入你提到的日期时,它会正确返回。例如:
询问九月二十五日一九八七年的展览
{
"session": {
"sessionId": "SessionId.removed",
"application": {
"applicationId": "amzn1.removed"
},
"attributes": {},
"user": {
"userId": "removed"
},
"new": true
},
"request": {
"type": "IntentRequest",
"requestId": "EdwRequestId.removed",
"locale": "en-US",
"timestamp": "2017-06-19T18:14:00Z",
"intent": {
"name": "ExhibitionsIntent",
"slots": {
"Date": {
"name": "Date",
"value": "1987-09-25"
}
}
}
},
"version": "1.0"
}
以下是交互模型中的意图:
ExhibitionsIntent exhibitions {Date}
{
"slots": [
{
"name": "Date",
"type": "AMAZON.DATE"
}
],
"intent": "ExhibitionsIntent"
},