【发布时间】: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才能使其可用