Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google cloud platform 谷歌云功能,超时5秒_Google Cloud Platform_Google Cloud Functions - Fatal编程技术网

Google cloud platform 谷歌云功能,超时5秒

Google cloud platform 谷歌云功能,超时5秒,google-cloud-platform,google-cloud-functions,Google Cloud Platform,Google Cloud Functions,在Google Actions中,如何增加请求超时 当我通过GoogleActions调用我的外部API时,GoogleActions将只等待5秒(最多),等待来自我的API的响应。但是我的API需要5秒以上的时间来响应,这导致了错误 “格式错误的响应:必须设置最终\u响应” 及 “XXX现在没有响应。请稍后再试。” (Google Assistant->Google Actions(最多在5秒内返回响应(需要配置此功能)->DialogFlow->Cloud函数(可以等待9分钟)->外部API

在Google Actions中,如何增加请求超时

当我通过GoogleActions调用我的外部API时,GoogleActions将只等待5秒(最多),等待来自我的API的响应。但是我的API需要5秒以上的时间来响应,这导致了错误

“格式错误的响应:必须设置最终\u响应”

“XXX现在没有响应。请稍后再试。”


(Google Assistant->Google Actions(最多在5秒内返回响应(需要配置此功能)->DialogFlow->Cloud函数(可以等待9分钟)->外部API(响应时间超过20秒))

最后,我找到了一个解决方法来增加Google设备的响应时间。在dialogFlow API中使用followUpEvents,等待时间增加到一分钟。

欢迎使用堆栈溢出!请学习如何提问。可以随时编辑云函数中的超时。它默认为1分钟,并且。至于另一部分,你能修改一下你的问题让它更清楚吗?@Mangu谢谢你的回答。请检查我更新的问题。以下是答案:使用followUpEvent,我可以将超时时间增加到一分钟或更多。您能告诉我如何做吗?dialowflow webhook不是超时5秒吗?嘿@Simarpreet,你能告诉我你到底是怎么做到的吗?我也有同样的问题。我使用DialogFlow UI(不是任何API)来管理我的意图,但为了实现我的目标,我有一个连接Firebase函数的webhook。你是如何实现的?