本文介绍了对话框流(api.ai)Webhook请求中的设备位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Google Assistant的Dialogflow聊天机器人,在以下Webhook请求JSON示例中:

I'm working on a Dialogflow chat bot for Google Assistant, in the webhook request JSON example here:

webhook接收包括其位置的设备数据:

the webhook receives device data including its location:

"device": {
       "location": {
           "coordinates": {
               "latitude": 123.456,
               "longitude": -123.456
           },
           "formatted_address": "1234 Random Road, Anytown, CA 12345, United States",
           "zip_code": "12345",
           "city": "Anytown"
       }
   }

出于某种原因,我的Webhook没有收到任何设备数据( device键完全丢失)。有人知道我在做什么错或如何包含这些数据吗?

For some reason my webhook is not receiving any device data (the "device" key is missing completely). Does anyone know what I'm doing wrong or how I can include this data?

推荐答案

您需要。然后,它们的位置将在请求JSON中可用。这是一个很好的。

Note that you're looking at the v1 API, which is deprecated and scheduled to be removed in the near future. Make sure you're working with the v2 documentation.

这篇关于对话框流(api.ai)Webhook请求中的设备位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 12:12