Dialogflow JSON V2 的丰富消息
Rich Messages for Dialogflow JSON V2
Google 有关于丰富消息 (https://developers.google.com/actions/assistant/responses) but I am using JSON request and response direct from DialogFlow and in the dialogFlow documentation no format for displaying rich messages is given to the user except one of a Basic Card in sample response on this link(https://dialogflow.com/docs/fulfillment#response) 的文档,其中键为 'fulfillmentMessages',其中定义了卡片。
如果使用 Actions SDK 而不是 Dialogflow JSON。
,每个在线资源都提供了显示丰富消息的代码
任何人都可以提供我可以在 fulfillmentMessages 中发送的每个丰富响应(卡片、列表、Table、轮播等)的代码片段。
谢谢!
As documented,大部分 Actions SDK 响应都嵌入在 payload.google
对象下的 Dialogflow 响应中,尽管这样做有一些曲折。
特别是,为了发回丰富的消息,它需要一个包含 RichResponse object. This is the same RichResponse object described by the Actions SDK and contains an items
property which is the array of different responses.
的 richResponse
字段
JSON 的 documentation for the JSON protocol used contains more information and there are a number of examples 使用 Dialogflow v2 回复。
无需创建自己的代码来生成每个丰富的响应,使用第三方聊天 UI 工具的简单方法 Kommunicate 因为它证明了现成的丰富消息服务,例如(建议回复、link 按钮、卡片轮播、图像等)使用 dialogflow fulfilment。
有多种方法可以通过 Dialogflow 设置丰富的响应按钮:
Dialogflow 提供了一种简单的方法来使用界面本身来使用自定义负载提供丰富的消息。
另一种方法是使用实现代码添加丰富的消息,方法是为意图启用 webhook 调用并将预构建的 Kommunicate 代码添加到内联编辑器。请查看 link 以获取分步说明
您现在可以使用 Dialogflow Messenger 集成(Beta 功能)轻松完成此操作。无需第三方付费应用程序,如 Kommunicate。查看文档 here.
Google 有关于丰富消息 (https://developers.google.com/actions/assistant/responses) but I am using JSON request and response direct from DialogFlow and in the dialogFlow documentation no format for displaying rich messages is given to the user except one of a Basic Card in sample response on this link(https://dialogflow.com/docs/fulfillment#response) 的文档,其中键为 'fulfillmentMessages',其中定义了卡片。
如果使用 Actions SDK 而不是 Dialogflow JSON。
,每个在线资源都提供了显示丰富消息的代码任何人都可以提供我可以在 fulfillmentMessages 中发送的每个丰富响应(卡片、列表、Table、轮播等)的代码片段。
谢谢!
As documented,大部分 Actions SDK 响应都嵌入在 payload.google
对象下的 Dialogflow 响应中,尽管这样做有一些曲折。
特别是,为了发回丰富的消息,它需要一个包含 RichResponse object. This is the same RichResponse object described by the Actions SDK and contains an items
property which is the array of different responses.
richResponse
字段
JSON 的 documentation for the JSON protocol used contains more information and there are a number of examples 使用 Dialogflow v2 回复。
无需创建自己的代码来生成每个丰富的响应,使用第三方聊天 UI 工具的简单方法 Kommunicate 因为它证明了现成的丰富消息服务,例如(建议回复、link 按钮、卡片轮播、图像等)使用 dialogflow fulfilment。
有多种方法可以通过 Dialogflow 设置丰富的响应按钮:
Dialogflow 提供了一种简单的方法来使用界面本身来使用自定义负载提供丰富的消息。
另一种方法是使用实现代码添加丰富的消息,方法是为意图启用 webhook 调用并将预构建的 Kommunicate 代码添加到内联编辑器。请查看 link 以获取分步说明
您现在可以使用 Dialogflow Messenger 集成(Beta 功能)轻松完成此操作。无需第三方付费应用程序,如 Kommunicate。查看文档 here.