Webhook呼叫失败.错误:无法解析Webhook JSON响应:找不到字段:消息google.cloud.dialogflow.v2.Intent.Message中的消息 [英] Webhook call failed. Error: Failed to parse webhook JSON response: Cannot find field: messages in message google.cloud.dialogflow.v2.Intent.Message

查看:96
本文介绍了Webhook呼叫失败.错误:无法解析Webhook JSON响应:找不到字段:消息google.cloud.dialogflow.v2.Intent.Message中的消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Dialogflow构建了一个漫游器,并将其连接到本地Webhook(现在可以通过ngrok访问它).我能够收到Dialogflow的响应,但是无法重播它.我遵循了如下所示的JSON结构-

我制作了一个简单的节点程序,该程序可以接受后响应并返回Dialogflow接受的json格式.您可以按照自己喜欢的任何方式发送请求.查看投放状态"标签:

I built a bot using Dialogflow and connected it to a local webhook (now accessing it through ngrok). I am able to receive the response from Dialogflow but I am unable to replay to it. I followed the JSON structure as shown here - Test response from webhook. But I am getting the following error in Dialogflow.

Webhook call failed. Error: Failed to parse webhook JSON response: Cannot find field: messages in message google.cloud.dialogflow.v2.Intent.Message.

Following is the reply that I sent to Dialogflow -

{
   "messages":[
      {
         "speech":"Text response",
         "type":0
      }
   ]
}

Please tell me what should be the exact format of the reply that I should send to Dialogflow.

解决方案

I faced same issue,resolved using below json on dialogflow :

I made a simple node program which accepts a post response and returns json of the format accepted by Dialogflow.You may send your request in any way you like. check on Fulfillment status tab :

这篇关于Webhook呼叫失败.错误:无法解析Webhook JSON响应:找不到字段:消息google.cloud.dialogflow.v2.Intent.Message中的消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆