我正在使用Google Action上的测试应用。因此,我做了一个新的动作,然后在Dialogflow和Firebase上创建了它的代理。 在Dialogflow代理中,我在项目设置中使用了“从Zip恢复”选项。现在,所有意图都已恢复。
我转到实现选项卡并切换了Webhook选项,并使用了一个Webhook链接并保存了该链接(我使用ngrok http 5000作为服务器来生成Webhook链接,每次重新运行该服务器时都必须对其进行更新)。现在,我返回到动作并尝试在模拟器中测试我的应用,并收到错误消息“由于语音响应空,未能将Dialogflow响应解析为AppResponse”。
我在操作控制台模拟器的Dialogflow Agent设置和“调试”选项卡中检查了客户端访问令牌,并且两者相同。 在ngrok控制台中,它显示“找到了302”。
302 Found error and a 404 Not Found error
我尝试删除并再次构建Dialogflow代理,但结果相同。
这是我测试我的应用程序时生成的响应。
{
"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\":\"13defd18-3bd2-49f9-832f-c084e2c67a50\",\"timestamp\":\"2019-04-10T13:55:33.587Z\",\"lang\":\"en-us\",\"result\":{},\"status\":{\"code\":206,\"errorType\":\"partial_content\",\"errorDetails\":\"Webhook call failed. Error: Failed to parse webhook JSON response: Expect message object but got: null.\"},\"sessionId\":\"ABwppHFKNCvUrR9vysffVhu2E6smTc7lBCsXs6GKh77cfjRgDjhYBw-voVq5fYcbE0YLoT4KRhE_G8lRiT8lab84FTU0bw\"}"
}
]
}
}
}
这显示在“调试”选项卡下
{
"response": "Archive test isn't responding right now. Try again soon.",
"expectUserResponse": true,
"conversationToken": "Eo8CS2s1M0...",
"audioResponse": "//NExAARSI...",
"ssmlMarkList": [],
"debugInfo": {
"assistantToAgentDebug": {
"curlCommand": "curl -v 'https://api.api.ai/api/integrations/google?token=749bb0fdf16048d09d1c6109db620061' -H 'Content-Type: application/json;charset=UTF-8' -H 'Google-Actions-API-Version: 2' -H 'Authorization: eyJhbGciOiJSUzI1NiIsImtpZCI6IjZmNjc4MWJhNzExOTlhNjU4ZTc2MGFhNWFhOTNlNWZjM2RjNzUyYjUiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLCJhdWQiOiJpbnRlcm5ldC1hcmNoaXZlLTg0MTBkIiwibmJmIjoxNTU0OTA3OTAxLCJpYXQiOjE1NTQ5MDgyMDEsImV4cCI6MTU1NDkwODMyMSwianRpIjoiNDNlYmQyNDg2NGFkYTdjZDg5MjBiMjMzOGM1OTFhM2Y2ZTUzMjYzNyJ9.XIhb-qvfBXw1luas0zUIFNZIwIjN1yDsHe9SAQiM2pO9pru6f6rA-lkr2Fk0M2NSQyFa1qVot8Tx7zv8Xd4t0ZEThVw2sTCiWr1Xg4G7s-VN1UbVve9gty2j4IbWxxMdyqmmwzK3h9Q5dC19GgiZkK_e4muAVCIu5tah-OGVqyAWdh2X4WoyooWaLQ3U8TjoojX08vkDqEBkgXZbWOozBIbqhU8S5uJBDj2BG5ddtIEqwIAlmBwfJGCzjLjcdfFNmg9_x-TXz2lHh8x35_LbHWuRWcvlHxWRalSWiPJRV-0MiGp4YLPytYF3ukcaNibLOmg7UOIdlDB52EiIfrqPQQ' -A 'Mozilla/5.0 (compatible; Google-Cloud-Functions/2.1; +http://www.google.com/bot.html)' -X POST -d '{\"user\":{\"userId\":\"ABwppHE--5IkRBwbhoIw34x3AcE1bsikcwcWHlOhgn0TnFrdWmYlARBBuxXF0Kkw_6_U5QsVRQ78RA5KjrCaeDLhuuLQyw\",\"locale\":\"en-US\",\"lastSeen\":\"2019-04-10T14:53:34Z\"},\"conversation\":{\"conversationId\":\"ABwppHEoy1L0upi8ML-kl2otjumOoWAtXa4v5dOJC3vXXCkoD4EPyjPmtWEG6unJD_8_fO0Ddxwo2T7x5g7LwordBkb-ew\",\"type\":\"NEW\"},\"inputs\":[{\"intent\":\"actions.intent.MAIN\",\"rawInputs\":[{\"inputType\":\"KEYBOARD\",\"query\":\"Talk to archive test\"}]}],\"surface\":{\"capabilities\":[{\"name\":\"actions.capability.MEDIA_RESPONSE_AUDIO\"},{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.ACCOUNT_LINKING\"},{\"name\":\"actions.capability.WEB_BROWSER\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"}]},\"isInSandbox\":true,\"availableSurfaces\":[{\"capabilities\":[{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.WEB_BROWSER\"},{\"name\":\"actions.capability.AUDIO_OUTPUT\"}]}],\"requestType\":\"SIMULATOR\"}'",
"assistantToAgentJson": "{\"user\":{\"userId\":\"ABwppHE--5IkRBwbhoIw34x3AcE1bsikcwcWHlOhgn0TnFrdWmYlARBBuxXF0Kkw_6_U5QsVRQ78RA5KjrCaeDLhuuLQyw\",\"locale\":\"en-US\",\"lastSeen\":\"2019-04-10T14:53:34Z\"},\"conversation\":{\"conversationId\":\"ABwppHEoy1L0upi8ML-kl2otjumOoWAtXa4v5dOJC3vXXCkoD4EPyjPmtWEG6unJD_8_fO0Ddxwo2T7x5g7LwordBkb-ew\",\"type\":\"NEW\"},\"inputs\":[{\"intent\":\"actions.intent.MAIN\",\"rawInputs\":[{\"inputType\":\"KEYBOARD\",\"query\":\"Talk to archive test\"}]}],\"surface\":{\"capabilities\":[{\"name\":\"actions.capability.MEDIA_RESPONSE_AUDIO\"},{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.ACCOUNT_LINKING\"},{\"name\":\"actions.capability.WEB_BROWSER\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"}]},\"isInSandbox\":true,\"availableSurfaces\":[{\"capabilities\":[{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.WEB_BROWSER\"},{\"name\":\"actions.capability.AUDIO_OUTPUT\"}]}],\"requestType\":\"SIMULATOR\"}",
"delegatedRequest": {
"delegatedRequest": ""
}
},
"agentToAssistantDebug": {
"agentToAssistantJson": "{\n \"responseMetadata\": {\n \"status\": {\n \"code\": 10,\n \"message\": \"Failed to parse Dialogflow response into AppResponse because of empty speech response\",\n \"details\": [{\n \"@type\": \"type.googleapis.com/google.protobuf.Value\",\n \"value\": \"{\\\"id\\\":\\\"1d8ba08c-783a-4de8-8241-1942da0de46e\\\",\\\"timestamp\\\":\\\"2019-04-10T14:56:42.073Z\\\",\\\"lang\\\":\\\"en-us\\\",\\\"result\\\":{},\\\"status\\\":{\\\"code\\\":206,\\\"errorType\\\":\\\"partial_content\\\",\\\"errorDetails\\\":\\\"Webhook call failed. Error: Failed to parse webhook JSON response: Expect message object but got: null.\\\"},\\\"sessionId\\\":\\\"ABwppHEoy1L0upi8ML-kl2otjumOoWAtXa4v5dOJC3vXXCkoD4EPyjPmtWEG6unJD_8_fO0Ddxwo2T7x5g7LwordBkb-ew\\\"}\"\n }]\n }\n }\n}",
"delegatedResponse": {
"delegatedResponse": ""
}
},
"sharedDebugInfoList": [
{
"name": "ResponseValidation",
"debugInfo": "",
"subDebugEntryList": [
{
"name": "MalformedResponse",
"debugInfo": "Failed to parse Dialogflow response into AppResponse because of empty speech response.",
"subDebugEntryList": []
}
]
}
]
},
"visualResponse": {
"visualElementsList": [
{
"displayText": {
"content": "Archive test isn't responding right now. Try again soon."
}
}
],
"suggestionsList": [],
"agentLogoUrl": ""
},
"clientError": 0,
"is3pResponse": true,
"clientOperationList": [],
"projectName": ""
}
错误的输出是
MalformedResponse
Failed to parse Dialogflow response into AppResponse because of empty speech response.