【问题标题】:Dialogflow - Triggered other intent while capturing required parameters(Entity)Dialogflow - 在捕获所需参数(实体)时触发其他意图
【发布时间】:2019-11-01 09:03:39
【问题描述】:

我创建了 2 个意图。

意图 1:

训练阶段 = 1) 天空是蓝色的
输入上下文 = 空
输出上下文 = 空

意图 2:

培训阶段 = 1) 引发事件(等等)
必需参数 = 1) param-A (entity;value=orange,watermelon,mango)
输入上下文 = 空
输出上下文 = "RaiseIncident"

模拟步骤:
1. 用户输入“引发事件”。
2. Intent 2 将被触发并提示输入参数-A。
3.天空中的用户键是蓝色的
4. Dialogflow 停止捕获 param-A 并返回意图 1 中的响应。

这是我的问题:

有什么方法可以继续捕获参数-A,直到输入正确的输入(橙子、西瓜、芒果)而不是触发其他意图?或者这是 Dialogflow 的标准行为?

【问题讨论】:

    标签: dialogflow-es


    【解决方案1】:

    这是标准行为,而且是有充分理由的。

    假设您有“引发事件”Intent 的描述方式,并且所需的参数是事件类型。所以如果不提供,会提示:“什么是事件类型?”

    U: Open an incident
    B: What is the incident type?
    

    如果用户不知道可能的事件类型是什么,您会怎么做?也许你会给他们一个 Intent,他们可以说“帮助”或“有哪些类型?”或等价物。但如果它只接受有效的事件类型,那么它将继续拒绝帮助请求。所以在你的场景下,对话可能听起来像

    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?
    

    但由于您可以创建“帮助”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 以便您录制您正在提示某些内容。然后您就可以添加上下文相关的帮助或回退处理。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-06-05
      • 1970-01-01
      相关资源
      最近更新 更多