Dialogflow CX webhook超时响应

huangapple go评论98阅读模式
英文:

Dialogflow CX webhook timeout response

问题

有没有办法在连接到我的 Webhook 失败时添加一个超时响应,就像在 Botcopy 中它无限期地保持着 3 个点一样,我想知道是否有一种方法可以在超时时添加一个响应,类似于:"连接已断开,请稍后再试"。

谢谢。

英文:

I am integrating dialogflow CX with Botcopy using a webhook, my question is if there is a way to add an timeout response, like when the connection to my webhook is down, in Botcopy it stays with the 3 dots indefinitely, and I wanted to check if there is a way to add a response on timeout something like: "The connection is down, please try again later".

Thanks.

答案1

得分: 1

以下是翻译好的部分:

解决方案是使用内置事件处理程序。查看文档!https://cloud.google.com/dialogflow/cx/docs/concept/handler#event-built-in。
基本上,在你的Webhook连接的地方,你必须添加一个事件处理程序,比如Webhook错误,每当你的Webhook找不到时就会触发,你可以在文档中找到更多相关的Webhook事件,如果你需要特定的事件,比如超时、拒绝、禁止等。
Dialogflow CX webhook超时响应

英文:

The solution was using the in-built event handlers. Check the docs! https://cloud.google.com/dialogflow/cx/docs/concept/handler#event-built-in.
Basically where you have your webhook connected, you have to add an event handler like webhook error, that will fire every time your webhook is not found, you can find more related webhook events in the documetation, if you need specific ones like time out, rejected, forbidden, etc.
Dialogflow CX webhook超时响应

huangapple
  • 本文由 发表于 2023年6月15日 20:44:39
  • 转载请务必保留本文链接:https://go.coder-hub.com/76482619.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定