Actions on google 什么是意图JSON响应格式中的Gactions SIGN_

Actions on google 什么是意图JSON响应格式中的Gactions SIGN_,actions-on-google,Actions On Google,有人能给我举一个谷歌在返回actions.intent.SIGN_IN intent时所期望的JSON的例子吗?我正在尝试让我的应用程序获得批准,我相信我返回的JSON是无效的。谷歌支持只是告诉我,我的应用程序不健康,响应不正确。下面是我在向服务器发送履行请求时返回的JSON: { "expectUserResponse": true, "expectedInputs": [{ "inputPrompt": { "initi

有人能给我举一个谷歌在返回actions.intent.SIGN_IN intent时所期望的JSON的例子吗?我正在尝试让我的应用程序获得批准,我相信我返回的JSON是无效的。谷歌支持只是告诉我,我的应用程序不健康,响应不正确。下面是我在向服务器发送履行请求时返回的JSON:

{
    "expectUserResponse": true,
    "expectedInputs": [{
            "inputPrompt": {
                "initialPrompts": [{
                        "textToSpeech": "You must link your Google Assistant."
                    }
                ],
                "noInputPrompts": []
            },
            "possibleIntents": [{
                    "intent": "actions.intent.SIGN_IN"
                }
            ]
        }
    ]
}

JSON格式记录如下:

{
  "conversationToken": "{\"state\":null,\"data\":{}}",
  "expectUserResponse": true,
  "expectedInputs": [
    {
      "inputPrompt": {
        "initialPrompts": [
          {
            "textToSpeech": "PLACEHOLDER_FOR_SIGN_IN"
          }
        ],
        "noInputPrompts": []
      },
      "possibleIntents": [
        {
          "intent": "actions.intent.SIGN_IN",
          "inputValueData": {}
        }
      ]
    }
  ]
}

上面的Leons链接似乎再也找不到答案了(可能是V1?)。事实上,除非您使用的是Google NodeJS SDK,否则很难找到答案。此链接:

提供一些信息-查找actions.intent.SIGN_IN。SignInValueSpec数据规范如下:

你会得到这样的回答:

{
  "payload": {
    "google": {
      "expectUserResponse": true,
      "richResponse": {
        "items": [
          {
            "simpleResponse": {
              "textToSpeech": "Please sign in"
            }
          }
        ]
      },
      "systemIntent": {
        "intent": "actions.intent.SIGN_IN",
        "data": {
          "@type": "type.googleapis.com/google.actions.v2.SignInValueSpec",
          "optContext": "To verify your age"
        }
      }
   }
}

谢谢,我确实要做一个更改。我在原始帖子中的JSON会被成功处理吗,因为它缺少几个字段?它缺少“conversationToken”和“inputValueData”。哦,Dialogflow webhook响应的格式规范与直接对话webhook响应的格式规范不同。