1)askForUpdatePermission 未找到意图
我遵循了更新示例Github-dialogflow-updates-nodejs https://github.com/actions-on-google/dialogflow-updates-nodejs并获得了更新许可来工作。
但是当我将 app.askForUpdatePermission("get.next.reminder") 添加到我自己的代码中时,模拟器表示我的代理没有响应。我没有收到授予更新许可的问题。
在模拟器错误选项卡中,我看到一个错误:
MalformedResponse
expected_inputs[0].possible_intents[0].input_value_data: The intent the app is asking for permission to send updates for is not found..
因此,我在我的代理中再次检查了意图名称(get.next.reminder),它显然在那里并映射到一个操作。我还测试了这个意图可以由用户输入触发。
响应选项卡显示如下响应:
{
"conversationToken": "[\"_actions_on_google_\"]",
"expectUserResponse": true,
"expectedInputs": [
{
"inputPrompt": {
"richInitialPrompt": {
"items": [
{
"simpleResponse": {
"textToSpeech": "PLACEHOLDER_FOR_PERMISSION"
}
}
]
}
},
"possibleIntents": [
{
"intent": "actions.intent.PERMISSION",
"inputValueData": {
"@type": "type.googleapis.com/google.actions.v2.PermissionValueSpec",
"permissions": [
"UPDATE"
],
"updatePermissionValueSpec": {
"intent": "get.next.reminder"
}
}
}
]
}
],
"responseMetadata": {
"status": {
"message": "Success (200)"
},
"queryMatchInfo": {
"queryMatched": true,
"intent": "d7edc1c1-1c67-49af-89bb-37e17ed35025"
}
}
}
我在哪里看到PLACEHOLDER_FOR_PERMISSION
在响应文本中。
不知道为什么它没有找到意图。
有人可以帮忙解决这个问题吗?
2)如何删除权限?
另外,还有一个单独但相关的问题:一旦授予许可,如何删除它?这对于能够进行测试非常重要。