首页 文章

实现数据对话框v2

提问于
浏览
2

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

1 回答

  • 0

    现在是 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."
        }
      }
    

相关问题