Dialogflow Webhook格式与会话Webhook格式 [英] Dialogflow Webhook Format vs. Conversation Webhook Format

查看:61
本文介绍了Dialogflow Webhook格式与会话Webhook格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google Actions提供了两种类型的实现-Dialogflow Webhook格式&会话Webhook格式。根据我的理解(根据本文档- https://developers.google .com / 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- https://developers.google.com/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格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆