[英]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.