我从webhook收到此响应,但是dialogflow用basicCard不响应,而是出现以下错误。
格式错误的响应
Webhook错误(206)。
我想知道如果响应有任何问题,我需要改进。
AoG模拟器在没有basicCard的情况下工作。
谢谢...
{
"conversationToken": "[\"follow_up_user_email\",\"follow_up_user_name\",\"follow_up_user_query\"]",
"expectUserResponse": true,
"expectedInputs": [
{
"inputPrompt": {
"richInitialPrompt": {
"items": [
{
"simpleResponse": {
"textToSpeech": "This is a Basic Card:"
}
},
{
"basicCard": {
"title": "Card Title",
"image": {
"url": "https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png",
"accessibilityText": "Google Logo"
},
"buttons": [
{
"title": "Button Title",
"openUrlAction": {
"url": "https://www.google.com"
}
}
],
"imageDisplayOptions": "WHITE"
}
}
]
}
},
"possibleIntents": [
{
"intent": "assistant.intent.action.TEXT"
},
{
"intent": "526ffb44-6bcb-412a-b8eb-09343ea90345"
},
{
"intent": "ead593af-950f-42ae-9c67-9a0565bc1a2d"
},
{
"intent": "cd6abbe2-ac77-4a76-a0e2-4819de881d1f"
}
],
"speechBiasingHints": [
"$user_query",
"$admission_query",
"$facility",
"$admission_type"
]
}
],
"responseMetadata": {
"status": {
"code": 14,
"message": "Webhook error (206)"
},
"queryMatchInfo": {
"queryMatched": true,
"intent": "526ffb44-6bcb-412a-b8eb-09343ea90345",
"parameterNames": [
"email"
]
}
}
}
这是我的DEBUG标签日志:
{
"response": "Soongsil guide isn't responding right now. Try again soon.",
"expectUserResponse": false,
"conversationToken": "EroCS2w1M2...",
"audioResponse": "//NExAASWK...",
"debugInfo": {
"assistantToAgentDebug": {
"curlCommand": "curl -v 'https://api.api.ai/api/integrations/google?token=5aa622c9340f4609aefe4ab4b4b011c0' -H 'Content-Type: application/json;charset=UTF-8' -H 'Google-Actions-API-Version: 2' -H 'Authorization: eyJhbGciOiJSUzI1NiIsImtpZCI6IjQ2M2ZlNDgwYzNjNTgzOWJiYjE1ODYxZTA4YzMyZDE4N2ZhZjlhNTYiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLCJhdWQiOiJ1bmlhc3Npc3RhbnRib3QiLCJuYmYiOjE1NDM4MzIzNzUsImlhdCI6MTU0MzgzMjY3NSwiZXhwIjoxNTQzODMyNzk1LCJqdGkiOiIxNTIyNzlmOWZjYjZmZTE3ODZmYTM0MjQzY2UzYjQ0MzhhZDkxOTBmIn0.EjfBv3tI-_YKcQjBOpDySERHScYOtPrLUPM0TWo23MVt53TV0cNaKzFMSAoQ4lw22WEBI_C2Ghz38W5QbmXLRMMs0OZQaMwpBtGM2vsaEDiuLnoOGTeEgH_J4JYTu1hjufPG6mJY0cY-Mr6CGV7Y9WlzgOBBLJ4Qhf-SnnQaRTKD2yB4yiF_16HzFk46caoo9Ym3eOZd-9ZkQ9x_MvmfOK_WR0ldUp8BocguBeTB7oqnMc44nnajgnY6BIWCm9dzxpFdLvSUCoucOUbkn3WhM6tYnqua7pIa9W6ew75w_ph9-6MxMvI-OGr1u39IT9pNN7Ojz9NRLq6u7kZyJCRdFg' -A 'Mozilla/5.0 (compatible; Google-Cloud-Functions/2.1; +http://www.google.com/bot.html)' -X POST -d '{\"user\":{\"userId\":\"ABwppHEwwiuoxAL916ji--u4JNvKc-BhNjLB63JRTRr80z7Hj5m7mwLtLEYdMWXBj2DXlPh6nzdlWOZxlBoA\",\"locale\":\"en-US\",\"lastSeen\":\"2018-12-03T10:18:52Z\"},\"conversation\":{\"conversationId\":\"ABwppHFJrjyCFEfsXlTB1yNk6JzpS3TuXZv_2OKga8jOJJFfl6QxF310U8i_LMHr-8tjQca_5N5Lphbiw39U\",\"type\":\"ACTIVE\",\"conversationToken\":\"[\\\"follow_up_user_email\\\",\\\"follow_up_user_name\\\",\\\"follow_up_user_query\\\"]\"},\"inputs\":[{\"intent\":\"actions.intent.TEXT\",\"rawInputs\":[{\"inputType\":\"KEYBOARD\",\"query\":\"muzamil.sw10@gmail.com\"}],\"arguments\":[{\"name\":\"text\",\"rawText\":\"muzamil.sw10@gmail.com\",\"textValue\":\"muzamil.sw10@gmail.com\"}]}],\"surface\":{\"capabilities\":[{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.MEDIA_RESPONSE_AUDIO\"},{\"name\":\"actions.capability.WEB_BROWSER\"}]},\"isInSandbox\":true,\"availableSurfaces\":[{\"capabilities\":[{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.WEB_BROWSER\"}]}],\"requestType\":\"SIMULATOR\"}'",
"assistantToAgentJson": "{\"user\":{\"userId\":\"ABwppHEwwiuoxAL916ji--u4JNvKc-BhNjLB63JRTRr80z7Hj5m7mwLtLEYdMWXBj2DXlPh6nzdlWOZxlBoA\",\"locale\":\"en-US\",\"lastSeen\":\"2018-12-03T10:18:52Z\"},\"conversation\":{\"conversationId\":\"ABwppHFJrjyCFEfsXlTB1yNk6JzpS3TuXZv_2OKga8jOJJFfl6QxF310U8i_LMHr-8tjQca_5N5Lphbiw39U\",\"type\":\"ACTIVE\",\"conversationToken\":\"[\\\"follow_up_user_email\\\",\\\"follow_up_user_name\\\",\\\"follow_up_user_query\\\"]\"},\"inputs\":[{\"intent\":\"actions.intent.TEXT\",\"rawInputs\":[{\"inputType\":\"KEYBOARD\",\"query\":\"muzamil.sw10@gmail.com\"}],\"arguments\":[{\"name\":\"text\",\"rawText\":\"muzamil.sw10@gmail.com\",\"textValue\":\"muzamil.sw10@gmail.com\"}]}],\"surface\":{\"capabilities\":[{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.MEDIA_RESPONSE_AUDIO\"},{\"name\":\"actions.capability.WEB_BROWSER\"}]},\"isInSandbox\":true,\"availableSurfaces\":[{\"capabilities\":[{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.WEB_BROWSER\"}]}],\"requestType\":\"SIMULATOR\"}",
"delegatedRequest": {
"delegatedRequest": ""
}
},
"agentToAssistantDebug": {
"agentToAssistantJson": "{\"conversationToken\":\"[\\\"follow_up_user_email\\\",\\\"follow_up_user_name\\\",\\\"follow_up_user_query\\\"]\",\"expectUserResponse\":true,\"expectedInputs\":[{\"inputPrompt\":{\"richInitialPrompt\":{\"items\":[{\"simpleResponse\":{\"textToSpeech\":\"This is a Basic Card:\"}},{\"basicCard\":{\"title\":\"Card Title\",\"image\":{\"url\":\"https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png\",\"accessibilityText\":\"Google Logo\"},\"buttons\":[{\"title\":\"Button Title\",\"openUrlAction\":{\"url\":\"https://www.google.com\"}}],\"imageDisplayOptions\":\"WHITE\"}}]}},\"possibleIntents\":[{\"intent\":\"assistant.intent.action.TEXT\"},{\"intent\":\"526ffb44-6bcb-412a-b8eb-09343ea90345\"},{\"intent\":\"ead593af-950f-42ae-9c67-9a0565bc1a2d\"},{\"intent\":\"cd6abbe2-ac77-4a76-a0e2-4819de881d1f\"}],\"speechBiasingHints\":[\"$user_query\",\"$admission_query\",\"$facility\",\"$admission_type\"]}],\"responseMetadata\":{\"status\":{\"code\":14,\"message\":\"Webhook error (206)\"},\"queryMatchInfo\":{\"queryMatched\":true,\"intent\":\"526ffb44-6bcb-412a-b8eb-09343ea90345\",\"parameterNames\":[\"email\"]}}}",
"delegatedResponse": {
"delegatedResponse": ""
}
},
"sharedDebugInfoList": [
{
"name": "ResponseValidation",
"debugInfo": "",
"subDebugEntryList": [
{
"name": "MalformedResponse",
"debugInfo": "Webhook error (206).",
"subDebugEntryList": []
}
]
}
]
},
"visualResponse": {
"visualElementsList": [
{
"displayText": {
"content": "Soongsil guide isn't responding right now. Try again soon."
}
}
],
"suggestionsList": [],
"agentLogoUrl": ""
},
"clientError": 0,
"is3pResponse": 1,
"clientOperationList": []
}
答案 0 :(得分:0)
check the DEBUG and ERROR tabs in the simulator to see if you find more detailed messages. In most cases you need to have Suggestion chips after the card.