Action On Google, webhook response with actions.intent.NEW_SURFACE

瘦欲@ 提交于 2020-01-04 13:11:48

问题


Trying to implement NEW_SURFACE in webhook response (Google Assistant vocal calling Dialogflow calling a webhook).

When I have web browser capability I display my cards, but I when to redirect the user to his phone when he is from the Google Home.

This is my error in Action On google :

{
      "responseMetadata": {
        "status": {
          "code": 10,
          "message": "Failed to parse Dialogflow response into AppResponse because of empty speech response",
          "details": [
            {
              "@type": "type.googleapis.com/google.protobuf.Value",
              "value": "{\"id\":\"28ef98e1-caec-4e1f-9a14-8fda597e8a06\",\"timestamp\":\"2018-08-17T12:31:10.735Z\",\"lang\":\"fr-ca\",\"result\":{},\"alternateResult\":{},\"status\":{\"code\":200,\"errorType\":\"success\"},\"sessionId\":\"1534509012113\"}"
            }
          ]
        }
      }
    }

And this is my webhook response :

{
    "fulfillmentMessages": [],
    "payload": {
        "google": {
            "expectUserResponse": true,
            "expectedInputs": [
                {
                    "inputPrompt": {
                        "richInitialPrompt": {
                            "items": [
                                {
                                    "simpleResponse": {
                                        "textToSpeech": "TEST CHANGE SURFACE"
                                    }
                                }
                            ]
                        }
                    },
                    "possibleIntents": [
                        {
                            "intent": "actions.intent.NEW_SURFACE",
                            "inputValueData": {
                                "@type": "type.googleapis.com/google.actions.v2.NewSurfaceValueSpec",
                                "context": "To show you an image",
                                "notificationTitle": "Check out this image",
                                "capabilities": [
                                    "actions.capability.SCREEN_OUTPUT"
                                ]
                            }
                        }
                    ]
                }
            ]
        }
    },
    "source": "google"
}

Need help please ;-)

来源:https://stackoverflow.com/questions/51896991/action-on-google-webhook-response-with-actions-intent-new-surface

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!