Google Actions Builder 需要许多插槽

问题描述

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

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

enter image description here

我可以添加尽可能多的必需插槽,但是当我尝试在 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"
}

对于某些上下文,我使用了两个必需的插槽填充:

enter image description here

解决方法

您可以根据需要包含任意数量的必需插槽。填满所有必需的插槽后,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?

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...