【问题标题】:Google Actions Builder Many Slot RequiredGoogle Actions Builder 需要许多插槽
【发布时间】:2021-06-22 12:02:41
【问题描述】:

大家好,我需要一些帮助/了解所需的插槽填充是如何工作的。

查看文档: https://developers.google.com/assistant/conversational/scenes

我可以添加尽可能多的所需插槽,但是当我尝试在 Google Actions Builder Simulator(测试)中对其进行测试时,当我只填充一个插槽时出现此错误:

{
  "insertId": "---",
  "jsonPayload": {
    "timestamp": "2021-06-22T11:46:48.872626Z",
    "endConversation": {},
    "status": {
      "message": "There is no prompt message nor helper instruction in the response.",
      "code": 13
    },
    "executionState": {
      "sessionParameters": {},
      "currentSceneId": "Success",
      "slots": {
        "status": "COLLECTING",
        "slots": {
          "goal": {
            "status": "FILLED",
            "mode": "REQUIRED",
            "updated": true,
            "value": "goal1"
          },
          "level": {
            "status": "EMPTY",
            "mode": "REQUIRED"
          }
        }
      }
    }
  },
  "resource": {
    "type": "assistant_action",
    "labels": {
      "project_id": "---",
      "version_id": "",
      "action_id": "---"
    }
  },
  "timestamp": "2021-06-22T11:46:48.872626Z",
  "severity": "CRITICAL",
  "labels": {
    "channel": "preview"
  },
  "logName": "---",
  "trace": "---",
  "receiveTimestamp": "2021-06-22T11:46:48.912102599Z"
}

在某些情况下,我使用了两个必需的插槽填充:

【问题讨论】:

    标签: actions-on-google actions-builder


    【解决方案1】:

    您可以添加任意数量的所需插槽。填满所有必需的插槽后,scene.slots.status 将设置为 "FINAL",并且满足预填充条件。

    对于每个插槽,您可以通过选择This slot is required 将其标记为需要。如果您需要访问该值,可以通过选择 Customize slot value writeback 并为会话参数键提供名称将其写入会话参数。

    您收到的错误是"There is no prompt message nor helper instruction in the response."

    在配置每个插槽时,您可以在首次提示用户填充插槽时添加自定义提示(取决于插槽类型)。如果未配置,您将收到上述错误消息。

    要添加提示,请在槽配置下,选择Send prompt 并添加您想对用户说的内容。

    例如:

    candidates:
      - first_simple:
          variants:
            - speech: What is your favorite number?
    

    【讨论】:

    • 好的,我知道了。但它仍然无法正常工作。我已经创建了一个具有目标和级别参数的意图测试。例如:测试;测试{目标};测试{级别};测试{目标} {级别}。如果我只是说测试它会进入我的场景测试并提示第一个无输入插槽,问题是插槽验证的顺序在这里很重要,如果我以不同的顺序说它不起作用。如果我说 test {level} 提示匹配将是目标不匹配。无论我说什么顺序,Alexa 模型都能完美运行。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-11-11
    • 1970-01-01
    • 2018-04-22
    • 1970-01-01
    相关资源
    最近更新 更多