【发布时间】:2019-03-05 07:40:54
【问题描述】:
我正在创建 Dialogflow 实现 webhook 并使用 https://github.com/dialogflow/dialogflow-fulfillment-nodejs
我想在 LINE 中使用快速回复并使用Suggestion,但它不能像我想要的那样工作quick reply。然后我决定尝试自定义有效负载,但它不起作用。
我的代码是这样的
function testQuickReplyHandler(agent) {
let payload = {
"messages": [
{
"type": "text",
"text": "Select your favorite food category or send me your location!",
"quickReply": {
"items": [
{
"type": "action",
"action": {
"type": "message",
"label": "Sushi",
"text": "Sushi"
}
},
{
"type": "action",
"action": {
"type": "message",
"label": "Tempura",
"text": "Tempura"
}
},
{
"type": "action",
"action": {
"type": "location",
"label": "Send location"
}
}
]
}
}
]};
agent.add(new Payload('LINE', payload));
}
我错过了什么吗?我也尝试删除“消息”字段,但也不起作用
【问题讨论】:
标签: dialogflow-es