实现数据对话框v2

时间:2018-03-01 09:43:11

标签: dialogflow

如何在对话框版本2中返回或替换履行数据字段? 当我收到完整填写时,不会通知此字段,并且未提及文档https://dialogflow.com/docs/reference/v2-comparison

1 个答案:

答案 0 :(得分:1)

现在是payload。 看看:https://dialogflow.com/docs/fulfillment#response

"data": {
    "google": {
      "expectUserResponse": true,
      "richResponse": {
        "items": [
          {
            "simpleResponse": {
              "textToSpeech": "this is a simple response"
            }
          }
        ]
      }
    },
    "facebook": {
      "text": "Hello, Facebook!"
    },
    "slack": {
      "text": "This is a text response for Slack."
    }
}

现在:

"payload": {
    "google": {
      "expectUserResponse": true,
      "richResponse": {
        "items": [
          {
            "simpleResponse": {
              "textToSpeech": "this is a simple response"
            }
          }
        ]
      }
    },
    "facebook": {
      "text": "Hello, Facebook!"
    },
    "slack": {
      "text": "This is a text response for Slack."
    }
  }