如何为不同的意图添加不同的后备意图 [英] How to add different fallback intents for different intents
问题描述
如何为不同的意图添加不同的后备意图?这样,该用户将看到适当的消息,而不是常见的后备消息.
How to add different fallback intents for different intents? So that user will see appropriate message instead of common fallback message.
推荐答案
如果您正在开发自己的Webhook来处理请求和响应,则最好对所有意图使用默认回退意图.将输出上下文添加到您的每个单独的意图中,并且基于此上下文,您可以使用单个默认回退意图(例如
If you are developing your own webhook to handle requests and response, it would be better to use Default Fallback intent for all the intents. Add an output context to each of your individual intents and based on this context you can respond back from the webhook using the single Default Fallback Intent like
switch(inputContextToDefaultFallback){
case "context1"...
case "context2"...
}
但是,如果您的所有意图均未使用webhook,则可以通过单击添加后续意图->然后选择回退来从对话框流中添加回退意图.像这样
But if all your intents are not using webhook, then you can add a fallback intent from the dialogflow by clicking Add follow-up intent --> then selecting fallback
like this
这篇关于如何为不同的意图添加不同的后备意图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!