获取MalformedResponse:由于语音响应为空(DialogflowV2)

时间:2019-06-11 07:39:48

标签: dialogflow actions-on-google google-assistant-sdk dialogflow-fulfillment google-assist-api

我正在尝试使用Google上的操作来显示Google助理中的“选择”列表,但出现错误-(格式错误的响应:由于语音响应为空,未能将Dialogflow响应解析为AppResponse ),并在我的聊天机器人上使用Dialogflow V2。 直到几天前,它在V1和V2中都可以正常工作,所以我不确定现在出了什么问题。

我已经在https://developers.google.com/actions/assistant/responses#list

上检查了有关google操作的文档,以获取richResponses

我的json文件与格式匹配(对于@type,我已在代码中将其设置为json属性,即使json响应中未显示“ @”,也可以正常工作几天之前)。

 {
   "fulfillmentText":"",
   "fulfillmentMessages":[
      {
         "text":{
            "text":[
               ""
            ]
         }
      }
   ],
   "source":"",
   "payload":{
      "google":{
         "expectUserResponse":true,
         "richResponse":{
            "items":[
               {
                  "simpleResponse":{
                     "textToSpeech":"",
                     "displayText":""
                  }
               }
            ]
         },
         "systemIntent":{
            "intent":"actions.intent.OPTION",
            "data":{
               "type":"type.googleapis.com/google.actions.v2.OptionValueSpec",
               "listSelect":{
                  "title":"",
                  "items":[
                     {
                        "optionInfo":{
                           "key":"",
                           "synonyms":[
                              ""
                           ]
                        },
                        "title":"",
                        "description":"",
                        "image":{
                           "url":"",
                           "accessibilityText":""
                        }
                     },
                     {
                        "optionInfo":{
                           "key":"",
                           "synonyms":[
                              ""
                           ]
                        },
                        "title":"",
                        "description":"",
                        "image":{
                           "url":"",
                           "accessibilityText":""
                        }
                     },
                     {
                        "optionInfo":{
                           "key":"",
                           "synonyms":[
                              ""
                           ]
                        },
                        "title":"",
                        "description":"",
                        "image":{
                           "url":"",
                           "accessibilityText":""
                        }
                     },
                     {
                        "optionInfo":{
                           "key":"",
                           "synonyms":[
                              ""
                           ]
                        },
                        "title":"",
                        "description":"",
                        "image":{
                           "url":"",
                           "accessibilityText":""
                        }
                     }
                  ]
               }
            }
         },
         "isSsml":true
      }
   },
   "outputContexts":[
      {
         "name":"help-context",
         "lifespanCount":0,
         "parameters":{
            "name":"",
            "companyName":"",
            "companyNameOriginal":""
         }
      }
   ]
}

0 个答案:

没有答案