简体   繁体   English

如何使用Node.js或Python在对话框流实现中使用custom_payload

[英]How to use custom_payload in dialogflow fulfillment using nodejs or python

i want to send custom_payload to my angular_chatbot but not getting response. 我想将custom_payload发送到我的angular_chatbot,但没有收到响应。
if any one can help me out. 如果有人可以帮助我。 would be great help!! 将是很大的帮助!

` const payloadJson = {
            expectUserResponse: true,
      isSsml: false,
      richResponse: {
        items: [{ simpleResponse: { textToSpeech: 'hello' } }]
      }

  };
let payload = new Payload({});
payload.setPayload(payloadJson);
agent.add(payload);
}`

Thanks in Advance 提前致谢

In the response to your detect intent request there is a object called queryResult . 在对您的检测意图请求的响应中,有一个名为queryResult的对象。

In the queryResult object there is a field called webhookPayload . queryResult对象中,有一个名为webhookPayload的字段。

The webhookPayload field will contain whatever was sent from the webhook which, in your example is {expectUserResponse: true,isSsml: false,richResponse: {items: [{ simpleResponse: { textToSpeech: 'hello' } }]} webhookPayload字段将包含从webhookPayload发送的任何内容,在您的示例中为{expectUserResponse: true,isSsml: false,richResponse: {items: [{ simpleResponse: { textToSpeech: 'hello' } }]}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用dialogflow-fulfillment-nodejs与Express - How use dialogflow-fulfillment-nodejs with Express 如何使用 nodejs 在 Dialogflow 中处理 webhook 实现 - How to handle webhook fulfillment in Dialogflow using nodejs 如何使用nodejs在对话流实现中将append数据到firebase? - How to append data to firebase in dialogflow fulfillment using nodejs? 如何在对话流实现中使用 OR 运算符 - How to use OR operator in dialogflow fulfillment Dialogflow Fulfillment Webhook - 请求有效负载始终为空 - Dialogflow Fulfillment Webhook - Request Payload is always blank Nodejs 中 Telegram、Facebook、Slack for DialogFlow 等平台的自定义负载 - Custom payload for platforms like Telegram, Facebook, Slack for DialogFlow in Nodejs 如何在 Dialogflow 实现内联中多次使用 web 抓取? 以及如何在履行内联代码中检测错误? - How to use multiple time web scraping in Dialogflow fulfillment inline? and how to detect error at fulfillment inline code? 如何使用履行代码在 Dialogflow 中设置 agent.parameters? - How to set agent.parameters in Dialogflow using fulfillment code? 在 Dialogflow Fulfillment 0.6.1 中使用 Nodemailer - Using Nodemailer with Dialogflow Fulfillment 0.6.1 Dialogflow-履行请求的有效负载-如何使用在请求有效负载中收到的用户ID注册用户 - Dialogflow - Fulfillment request pay load - How to register the user with user id received in request payload
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM