【发布时间】:2019-02-06 14:25:46
【问题描述】:
我正在尝试使用操作 sdk 在 google 操作会话结束时寻求用户反馈。
根据 Actions 文档 (https://developers.google.com/actions/assistant/conversation-exits),我已设置取消意图
"conversations" : {
...
"inDialogIntents": [
{
"name": "actions.intent.CANCEL"
},
...
在我的函数代码中,我调用了SimpleResponse,如下所示:
app.intent('actions.intent.CANCEL', (conv, input) => {
conv.close(new SimpleResponse({
speech: 'Kindly rate between 1 and 5,
text: 'Rate between 1 and 5'
}));
});
当用户说goodbye 时,上面的代码就会被调用。可以听到语音并显示文本,但对话会立即退出,并带有耳机。
文档中提到系统会在退出前等待 2 秒,但它似乎会立即退出。有没有办法让这个工作?谢谢
【问题讨论】: