emk*_*kay 6 alexa alexa-skill alexa-skills-kit amazon-echo alexa-slot
我正在尝试建立一个alexa自定义技能.我正面临一个问题,即我试图从用户那里得到是/否回答该技能要求用户提出的问题.
Alexa: Would you like to know the rules of the game?
User: <Can respond either Yes or No>
Run Code Online (Sandbox Code Playgroud)
根据用户响应,我想执行一个特定的操作.
这是我的意图架构:
{
"intents": [
{
"intent": "AMAZON.StopIntent"
},
{
"intent": "AMAZON.CancelIntent"
},
{
"intent": "AMAZON.HelpIntent"
},
{
"intent": "StartGame"
},
{
"intent": "GetRules"
}
]
}
Run Code Online (Sandbox Code Playgroud)
以下是我的示例话语:
StartGame Begin the game
StartGame Start the game
GetRules What are the rules
GetRules Get the rules
GetRules Tell me the rules
GetRules Tell me the rules again
Run Code Online (Sandbox Code Playgroud)
技能问用户的问题如下:
Welcome to the game. Would you like me to tell you the rules?
Run Code Online (Sandbox Code Playgroud)
每当我说"是"时,StartGame意图就是被触发的内容.("否"的情况也是如此).Alexa总是选择StartGame作为意图.调用"GetRules"意图的最佳方法是什么.我希望用户只说"是/否"而不是说"获取规则".
如果已经回答/需要更多信息,请告诉我.
您需要使用AMAZON.YesIntent和AMAZON.NoIntent.
你可以在这里阅读它们:
| 归档时间: |
|
| 查看次数: |
6679 次 |
| 最近记录: |