javascript Dialogflow示例自定义有效负载

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了javascript Dialogflow示例自定义有效负载相关的知识,希望对你有一定的参考价值。

  return {
    fulfillmentText: response,
    fulfillmentMessages: [
    ],
    "payload": {
      "google": {
        "richResponse": {
            "items": [
                {
                    "simpleResponse": {
                        "textToSpeech": "simpleResponse: testing",
                    },
                },
                {
                    "mediaResponse": {
                        "mediaType": "AUDIO",
                        "mediaObjects": [
                            {
                                "name": "mediaResponse name",
                                "description": "mediaResponse description",
                                "largeImage": {
                                    "url": "https://cf-images.us-east-1.prod.boltdns.net/v1/jit/5745608559001/8d40486e-b17c-4b2b-a5f2-d80e5c017206/main/1280x720/13s54ms/match/image.jpg",
                                    "accessibilityText":"..."
                                },
                                "contentUrl": "https://s3.amazonaws.com/static.thefemalequotient.com/fpo/CarolynEverson2_Cannes16_AskHer.mp4"
                            }
                        ]
                    },
                }
            ],
           "suggestions": [
                {
                    "title": "This"
                },
                {
                    "title": "That"
                }
            ]
        }
      }
    },    
  }

以上是关于javascript Dialogflow示例自定义有效负载的主要内容,如果未能解决你的问题,请参考以下文章

html 用于连接DialogFlow和Firebase实时数据库的客户端示例

javascript 用于连接DialogFlow和Firebase实时数据库的云功能

如何在 C# 中调用 google.apis.dialogflow.v2

Dialogflow中训练短语中的问号

如何从网页访问 Dialogflow V2 API?

实战IFE的JavaScript和树