![](/img/trans.png)
[英]Is there a way to directly set fulfillment messages using dialogflow app instance using actions on google client library
[英]How to set dialogflow fulfillment response json context without using webhook client?
我想使用 Dialogflow fulfillment 创建对 Facebook 集成的丰富响应。 我尝试使用 webhook 但它不起作用,然后我直接使用响应尝试以下方式,现在我面临这个上下文绑定问题。
我在下面试过
let responseJson = {};
let rich = [
{
'text': {
'text': [
text
],
},
'platform': 'FACEBOOK'
},
];
responseJson.fulfillmentMessages = rich;
responseJson.outputContexts = context;
response.json(responseJson);
我的背景 JSON
{ name: 'MAINTENANCE_REQUEST', lifespan: 5, parameters: { maintenanceRequest: maintenanceRequest }}
要在没有 webhook 的情况下添加自定义负载,请将 go 添加到您的意图中,然后滚动到显示“响应”的底部。 点击加号(图片),点击facebook选项。 单击添加响应 -> 自定义负载。 此处描述了自定义负载的格式和可用字段。 删除“文本响应”(如果存在),这样自定义负载将是唯一要返回的负载。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.