Dialogflow Webhook格式与会话Webhook格式

编程入门 行业动态 更新时间:2024-10-27 18:20:24
本文介绍了Dialogflow Webhook格式与会话Webhook格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

Google Actions提供了两种类型的实现-Dialogflow Webhook格式&会话Webhook格式。根据我的理解(根据本文档- developers.google / actions / build / json / conversation-webhook-json ),如果我们使用Actions SDK,则Google发送会话Webhook格式请求;如果使用DialogFlow,则Google使用 Dialogflow Webhook格式。

我之所以这样问,是因为Google的请求格式已从最近两天从Dialogflow Webhook格式更改为Conversation Webhook格式。我们没有使用Actions SDK,因此在我看来,它似乎来自Google。

解决方案

关于消息格式的问题听起来是正确的。

但是,有些困惑是,如果您使用的是Google Simulator上的操作-您将始终看到会话格式版本。这是因为AoG将其发送到Dialogflow,然后将其转换为 Dialogflow格式,然后再将其发送到Webhook。 (它在返回的过程中进行了类似的转换。)因此,如果您只是通过模拟器查看内容,则可能会对实际看到的内容感到困惑。

还请记住,对话格式也(主要)是在 originalDetectIntentRequest.payload 下的对话流格式内(内部)发送的。如果您没有仔细查看,则会在此处看到它,并且可能会错过用于Dialogflow的消息格式的其他部分。

如果您实际看到的是Dialogflow Webhook中的对话格式 JSON-这非常奇怪。没有可以控制的设置。您应通过支持页面与Google联系,以尝试弄清正在发生的事情。 p>

There are two types of fulfilments provides by Google Actions - Dialogflow Webhook Format & Conversation Webhook Format. In my understanding (as per this doc- developers.google/actions/build/json/conversation-webhook-json) Google sends "Conversation Webhook Format" request if we are using Actions SDK and Google uses "Dialogflow Webhook Format" if we use DialogFlow. Is this understanding correct?

The reason I am asking this is because the request format from Google has suddenly changed from the last two days from Dialogflow Webhook Format to Conversation Webhook Format. We are not using Actions SDK, so to me it appears some bug from Google. Is this change possible using settings?

解决方案

Your question about the message format sounds correct.

Some of the confusion, however, is that if you're using the Actions on Google Simulator - you will always see the "Conversation Format" version. This is because AoG sends this to Dialogflow, which then converts it into the "Dialogflow Format" before it sends it to your webhook. (It does a similar conversion on the way back.) So if you're just looking at things through the Simulator, you may get confused about what you will actually see.

Also keep in mind that the "Conversation Format" is also (mostly) sent along inside the "Dialogflow Format" under originalDetectIntentRequest.payload. If you're not looking carefully, you'll see it there and may miss the other parts of the message format that are intended for Dialogflow.

If you are actually seeing the Conversation Format JSON in your Dialogflow webhook - this is extremely strange. There is no setting that you can control that should be able to do this. You should contact Google through the Support page to try and clarify what is going on.

更多推荐

Dialogflow Webhook格式与会话Webhook格式

本文发布于:2023-10-11 04:44:12,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1480717.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:格式   Dialogflow   Webhook

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!