0

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

查看文档: https ://developers.google.com/assistant/conversational/scenes 在此处输入图像描述

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

{
  "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"
}

在某些情况下,我使用了两个必需的插槽填充: 在此处输入图像描述

4

1 回答 1

0

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

对于每个插槽,您可以通过选择 将其标记为需要This slot is requiredCustomize 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?
于 2021-07-02T22:43:04.107 回答