简体   繁体   English

使用对话框流在内联编辑器之外创建不可知的卡片

[英]Creating agnostic cards outside inline editor using dialogflow

I want to create cards in my Dialogflow webhook developed in Python.我想在 Python 开发的 Dialogflow webhook 中创建卡片。 I know how to do it in the Inline Editor:我知道如何在内联编辑器中做到这一点:

    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*"));

However I have to disallow the inline editor when using a self designed webhook.但是,在使用自行设计的 webhook 时,我必须禁止内联编辑器。 I don't know how to create the same card with button messages to use it on a self designed website, either from the app with Post request from my Flask app, or using the custom payload option.我不知道如何创建带有按钮消息的同一张卡片,以便在自行设计的网站上使用它,无论是来自我的 Flask 应用程序的发布请求的应用程序,还是使用自定义有效负载选项。

How to create cards from custome payload or app from post requests?如何从客户有效负载或来自发布请求的应用程序创建卡片?

My website is based on this repository我的网站基于此存储库

I would look at pydialogflow-fulfillment module: it works with Flask and gives you an SDK to create the main response types (text response, suggested actions):我会看一下pydialogflow-fulfillment模块:它与 Flask 一起使用,并为您提供 SDK 来创建主要响应类型(文本响应,建议的操作):

dialogflow_response.add(Suggestions(["Option 1","Option 2","Option 3"]))

Check out Flask sample on GitHub查看 GitHub 上的Flask样品

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

相关问题 在使用内联编辑器实现的 DialogFlow Messenger 中,setContext() 干扰 setFollowupEvent() - in DialogFlow Messenger using inline editor for fulfillment, setContext() is interfering with setFollowupEvent() 如何使用DialogFlow在线编辑器从Firebase检索数据 - How to retrieve data from Firebase using DialogFlow Inline Editor 内联编辑器中的对话流捕获实体 - dialogflow capturing entity in inline editor 如何在嵌入式编辑器dialogflow中发出发布请求? - how to make post request in inline editor dialogflow? 是否可以在dialogflow内联编辑器中使用外部库? - Is it possible to use external libraries in the dialogflow inline editor? Dialogflow 实现内联编辑器 api 请求 - Dialogflow fulfillment inline editor api request Dialogflow 到 Firestore 内联编辑器 javascript:对集合的不同参数进行排序和过滤 - Dialogflow to firestore inline editor javascript: sorting and filtering on different parameters of collection 我可以在 Inline Fulfillment Dialogflow 编辑器中跨对话存储计数器吗? - Can I store a counter across conversation in Inline Fulfillment Dialogflow editor? 如何在 Google Dialogflow Fullfilment Inline Editor 中安装 npm 包 - How to install npm packages within Google Dialogflow Fullfilment Inline Editor 在DialogFlow内联编辑器中使用“ request-promise-native”包 - Use 'request-promise-native' package in DialogFlow inline editor
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM