DialogflowApp askForUpdatePermission不起作用 [英] DialogflowApp askForUpdatePermission Not Working

查看:99
本文介绍了DialogflowApp askForUpdatePermission不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

1)askForUpdatePermission找不到意图

我在 Github -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)如何删除权限?

还有一个单独但相关的问题:授予许可后,如何将其删除?进行测试真的很重要.

解决方案

1)是否正确配置了"get.next.reminder"意图?

转到Google操作控制台->项目->概述-> 5:操作发现和更新->操作"get.next.reminder"->用户更新和通知->您是否要发送推送通知?

网址应为:console.actions.google.com/project/your-project/overview/actionsdiscovery/action/get.next.reminder

2)要删除权限,您必须清除您的应用程序或点击通知中的关闭"

1) askForUpdatePermission not finding intent

I followed the Update Sample at Github -dialogflow-updates-nodejs and got the update permission to work.

But when I added app.askForUpdatePermission("get.next.reminder") into my own code, the simulator says that my agent is not responding. I did not get the question to give update permission.

In the simulator error tab, I see an error:

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..

So I checked the intent name (get.next.reminder) again in my agent and it is clearly there and mapped to an action. I also tested that this intent can be triggered by user input.

The response tab shows the response like this:

{
  "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"
    }
  }
}

Where I see PLACEHOLDER_FOR_PERMISSION in the response text.

Not sure why it is not finding the intent. Can anyone please please help with this?


2) How to remove permissions?

Also, a separate but related question: once you give the permission, how can you remove it? This is really important to be able to test.

解决方案

1) Is the "get.next.reminder" intent configured correctly?

Go to Google action console -> project -> overview -> 5:Action discovery and updates -> action "get.next.reminder" -> User updates and notifications -> Would you like to send push notifications?

Url should be: console.actions.google.com/project/your-project/overview/actionsdiscovery/action/get.next.reminder

2) To remove permission you must clear your application or click "turn off" in the notification

这篇关于DialogflowApp askForUpdatePermission不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆