【发布时间】:2017-09-28 02:51:21
【问题描述】:
当我在 google 项目和 API.AI 代理上创建操作时,我使用自己的服务作为 API.AI 实现 webhook。我希望 API.AI 会调用我的 webhook。但是当我通过谷歌上的动作模拟器测试它时,API.AI 总是返回:
"message": "Unexpected apiai response format: Empty speech response",
"apiResponse": {
"id": "905d5727-bea8-4630-8d3a-e6c173159a94",
"timestamp": "2017-09-28T02:20:06.954Z",
"lang": "en",
"result": {},
"status": {
"code": 206,
"errorType": "partial_content",
"errorDetails": "Webhook call failed. Error: Webhook response was empty."
},
"sessionId": "1506565201634"
}
但是当我查看 apache 的日志时,API.AI 没有调用我的 webhook!当我将 webhook url 替换为 firebace 函数时,它工作成功。但是如果我使用自己的服务 url 作为 API.AI webhook url,那么 API.AI 无论如何都不会调用 webhook。我的服务使用 https。
【问题讨论】:
-
您能说明一下您的 HTTPS 服务是如何工作的吗?它是否监听 POST 请求?您可以在此处粘贴来自您的服务的 JSON 响应吗?
-
我使用apache来监听https请求,当然也包括POST请求。无论我的服务返回任何 JSON,API.AI 都不会请求我的服务。 apache 的日志中没有关于我设置为 API.AI webhook url 的 url。我确定可以请求该网址。
标签: webhooks actions-on-google dialogflow-es