1

我正在建立一项技能,要求用户说出他的出生日期。

他可以为此说一些例子

 - 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}

我该怎么做才能让它发挥作用?

4

2 回答 2

0

根据 alexa 文档,类型插槽 AMAZON.date 仅接受当前日期或之后的日期。因此,您在此处的所有示例都将不起作用。如需完整文档,请访问此网址

于 2017-06-17T07:17:58.720 回答
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"
},
于 2017-06-19T18:23:14.047 回答