【发布时间】:2020-05-18 19:50:08
【问题描述】:
我想在我用 Python 开发的 Dialogflow webhook 中创建卡片。我知道如何在内联编辑器中做到这一点:
agent.add(new Card({
title: '*How has the COVID-19 crisis :mask:*',
text: 'impacted the stability of your life?',
})
);
agent.add(new Suggestion("1 :cold_sweat: *more exasperated and hopeless*"));
agent.add(new Suggestion("2 :expressionless: *less freaked out than other people*"));
agent.add(new Suggestion("3 :relieved: *More calm and hopeful*"));
agent.add(new Suggestion("4 :fearful: *More scared and panicked*"));
agent.add(new Suggestion("5 :smiley: *More surprised and baffled*"));
但是,当使用自行设计的 webhook 时,我必须禁用内联编辑器。我不知道如何使用按钮消息创建同一张卡片,以便在自行设计的网站上使用它,无论是从我的 Flask 应用程序的带有 Post 请求的应用程序,还是使用自定义有效负载选项。
如何从客户有效负载或来自发布请求的应用创建卡片?
我的网站基于this repository
【问题讨论】:
标签: javascript python-3.x flask dialogflow-es chatbot