必须设置格式错误的响应“ final_response” [英] Malformed Response 'final_response' must be set

查看:112
本文介绍了必须设置格式错误的响应“ final_response”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用DialogFlow的webhook东西,当我按如下方式发送JSON响应时:

I'm using DialogFlow's webhook thing and when I send my JSON response as follows:

{
  "fulfillmentText": "This is a text response",
  "source": "example.com",
  "payload": {
    "google": {
      "richResponse": {
        "items": [
          {
            "simpleResponse": {
              "textToSpeech": "this is a simple response"
            }
          }
        ]
      }
    }
  }
}

但出现错误必须设置MalformedResponse'final_response'。在网络服务器响应后。

but I get the error MalformedResponse 'final_response' must be set. after the webserver responds.

推荐答案

该JSON响应对于Dialogflow Webhook实现协议的V2有效。确保已完成以下操作:

That JSON response is valid for V2 of the Dialogflow webhook fulfillment protocol. Make sure you've done the following:


  1. 确保已打开V2 API。单击左上角的设置齿轮,然后单击V2 API按钮。

  1. Make sure you have the V2 API turned on. Click the settings gear in the upper left and click the V2 API button.

请确保已为Webhook的URL设置了实现,并且已针对要测试的Intent启用了该功能。

Make sure you have Fulfillment set for the URL for your webhook, and that you have it turned on for the Intent you're testing with.

这篇关于必须设置格式错误的响应“ final_response”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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