【问题标题】:Google Assistant "Talk to ..." on Default intent using simulator使用模拟器默认意图的 Google 助理“与...交谈”
【发布时间】:2019-07-07 15:53:49
【问题描述】:

我在 Google Actions 控制台中配置 Google Assistant 时遇到了困难。

虽然我已经使用 gactions 上传了一个非常简单的 action.json 文件,但当我说“Hey Google,与 Rasp Pi 交谈”时,它只会以静态填充响应(而“Rasp Pi”是定义的显示名称在“调用”选项卡中)

我打开模拟器,它已经向我推荐了“与 Rasp Pi 对话”这句话

单击“与 Rasp Pi 交谈”后,出现错误: “很抱歉,出了点问题。请重试。”

下面是我上传成功的action.json。

{
"manifest": {
    "displayName": "Example",
    "invocationName": "Example",
    "category": "PRODUCTIVITY"
},
"locale": "de",
"actions": [
    {
        "name": "MAIN",
        "description": "Default Welcome Intent",
        "fulfillment": {
            "staticFulfillment": {
                "templatedResponse": {
                    "items": [
                        {
                            "simpleResponse": {
                                "textToSpeech": "Was kann ich tun?"
                            }
                        }
                    ]
                }
            }
        },
        "intent": {
            "name": "actions.intent.MAIN"
        }
    },

有什么想法吗?

更新

使用gactions test --project <project-id> --action_package action.json 后,我收到了以下消息,我打算从另一台支持谷歌的设备上对其进行测试。 但还没有在模拟器上

Pushing the app for the Assistant for testing...
Your app for the Assistant for project speech-cd6e3 is now ready for testing on Actions on Google enabled devices or the Actions Web Simulator at https://console.actions.google.com/project/<project-id>/simulator/

【问题讨论】:

  • 您阅读了哪些文档来整理此操作包?这似乎是 Actions SDK 和 Google Assistant SDK 之间无法使用的混合体。
  • 好吧,实际上它只是不使用对话框流,而是上传 action.json 以提供类似的功能 - developers.google.com/actions/sdk/create-a-project
  • 尽管在该指南中,他们为响应定义了一个 webhook,而不是进行静态响应。
  • 确实如此,但即使使用 webhook,我仍然必须执行 gactions test 才能使其可用

标签: google-assistant-sdk


【解决方案1】:

答案很简单。

正如我在自己的问题中已经提到的,做一个gactions test --project &lt;project-id&gt; --action_package action.json 使其可用于模拟器(和其他设备)似乎很重要

另外需要注意的是,每当您收到以下消息时:

很抱歉,出了点问题。请重试。*

这可能是因为 actions.json 中的定义不正确,或者执行不包含响应(例如 simpleResponse -> textToSpeech)

所以,我通过这样做解决了这个问题

  1. gactions update [...]
  2. 后跟gactions test [...]
  3. 始终确保 action.json 语法正确(拼写错误)
  4. 确保至少返回一个“textToSpeech”作为完整填充

最后但并非最不重要的一点是在模拟器上耐心接受新上传的定义

【讨论】:

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