我对Google智能助理的操作会向用户显示使用 Carousel 的选项列表 . 旋转木马中显示的每个项目都有一个选项键 .
Carousel
在Google NodeJS SDK上的操作的第1版中,我使用 app.getSelectedOption() 来访问处理选项选择的intent中所选选项的键 .
app.getSelectedOption()
如何在v2中访问此密钥?
在source code of the new SDK找到了答案 .
处理函数的第三个参数是选项键:
app.intent('Get Option', (conv, input, option) => { console.log(option) // This will log the key }
1 回答
在source code of the new SDK找到了答案 .
处理函数的第三个参数是选项键: