我看到一种奇怪的行为。我发送了一张包含一些信息的基本卡片,但无论expectUserResponse json标志如何,在Google Assistant中对话都不会结束。怎么会这样?这是个bug吗?有人能确认一下吗?
返回的包含卡片的JSON:
{
"data": {
"google": {
"expectUserResponse": false,
"systemIntent": {
"intent": "actions.intent.TEXT"
},
"richResponse": {
"items": [
{
"simpleResponse": {
"textToSpeech": "Some text",
"displayText": "Some text"
}
},
{
"basicCard": {
"title": "A title",
"formattedText": "A long text",
"buttons": [
{
"title": "Title button",
"openUrlAction": {
"url": "http://www.google.com"
}
}
]
}
}
]
}
}
}
}(来自https://plus.google.com/102582215848134314158/posts/PG3NbHG9dsr)
发布于 2017-09-16 21:22:12
问题是您指定的是systemIntent。这表明应该使用什么系统意图来处理响应。
但是您不希望处理响应,正如您尝试使用"expectUserResponse": false指出的那样。
在给定冲突信息的情况下,它选择遵守systemIntent设置并等待响应。
解决方案是完全删除systemIntent部分。通常,除非您请求许可或其他帮助意图,否则您可以省略这一节,因为您使用的是API.AI。
https://stackoverflow.com/questions/46254374
复制相似问题