Dialogflow - 在捕获所需参数(实体)时触发其他意图
Dialogflow - Triggered other intent while capturing required parameters(Entity)
我创建了 2 个意图。
意图 1:
Training phase = 1) the sky is blue
Input context = empty
Output context = empty
意图 2:
Training phase = 1) raise an incident (and etc)
Required param =
1) param-A (entity;value=orange,watermelon,mango)
Input context =
empty
Output context = "RaiseIncident"
模拟步骤:
1. 用户输入 "raise an incident".
2. Intent 2将被触发并提示输入参数A。
3.天空中的用户键为蓝色
4. Dialogflow 停止捕获参数 A 和 return 意图 1 中的响应。
这是我的问题:
有没有办法继续捕获参数A直到输入正确的输入(橙子、西瓜、芒果)而不是触发其他意图?或者这是 Dialogflow 的标准行为?
这是标准行为,有很好的理由。
假设您有 "raise an incident" 您所描述的意图,并且所需的参数是针对事件类型的。所以如果不提供,则提示:"What is the incident type?"
U: Open an incident
B: What is the incident type?
如果用户不知道可能的事件类型是什么,您会怎么做?也许你会给他们一个 Intent,他们可以说 "Help" 或 "What types are there?" 或等价物。但如果它只接受有效的事件类型,那么它会一直拒绝帮助请求。所以在你的场景下,对话听起来可能像
U: Open an incident
B: What is the incident type?
U: Green
B: What is the incident type?
U: Help
B: What is the incident type?
但由于您可以创建 "Help" Intent,因此您可以提供该信息,他们可以重新触发 Intent 以引发事件。
U: Open an incident
B: What is the incident type?
U: Help
B: You can open mango or apple incident types. What would you like to do?
U: Open a mango incident
虽然 Dialogflow 中的必需参数看起来是件好事,但在许多情况下并不能很好地发挥作用。更好的做法是将其设为可选参数,这样您就可以在他们预先告诉您时捕获它,但是如果您需要的值缺失 - 提示它们并设置 Context 这样您就可以记录您正在提示的内容。然后您将能够添加上下文相关的帮助或回退处理。
我创建了 2 个意图。
意图 1:
Training phase = 1) the sky is blue
Input context = empty
Output context = empty
意图 2:
Training phase = 1) raise an incident (and etc)
Required param = 1) param-A (entity;value=orange,watermelon,mango)
Input context = empty
Output context = "RaiseIncident"
模拟步骤:
1. 用户输入 "raise an incident".
2. Intent 2将被触发并提示输入参数A。
3.天空中的用户键为蓝色
4. Dialogflow 停止捕获参数 A 和 return 意图 1 中的响应。
这是我的问题:
有没有办法继续捕获参数A直到输入正确的输入(橙子、西瓜、芒果)而不是触发其他意图?或者这是 Dialogflow 的标准行为?
这是标准行为,有很好的理由。
假设您有 "raise an incident" 您所描述的意图,并且所需的参数是针对事件类型的。所以如果不提供,则提示:"What is the incident type?"
U: Open an incident
B: What is the incident type?
如果用户不知道可能的事件类型是什么,您会怎么做?也许你会给他们一个 Intent,他们可以说 "Help" 或 "What types are there?" 或等价物。但如果它只接受有效的事件类型,那么它会一直拒绝帮助请求。所以在你的场景下,对话听起来可能像
U: Open an incident
B: What is the incident type?
U: Green
B: What is the incident type?
U: Help
B: What is the incident type?
但由于您可以创建 "Help" Intent,因此您可以提供该信息,他们可以重新触发 Intent 以引发事件。
U: Open an incident
B: What is the incident type?
U: Help
B: You can open mango or apple incident types. What would you like to do?
U: Open a mango incident
虽然 Dialogflow 中的必需参数看起来是件好事,但在许多情况下并不能很好地发挥作用。更好的做法是将其设为可选参数,这样您就可以在他们预先告诉您时捕获它,但是如果您需要的值缺失 - 提示它们并设置 Context 这样您就可以记录您正在提示的内容。然后您将能够添加上下文相关的帮助或回退处理。