简体   繁体   English

可以从操作控制台导入/导出 Google 操作吗?

[英]Can Google Actions be imported/exported from the Actions Console?

I'm just starting to learn how to build an Action with Scenes and Intends.我刚刚开始学习如何使用场景和意图构建动作。 Very basic.很基础。 I see that prompts can be defined in JSON.我看到提示可以在 JSON 中定义。 Is it possible to export the whole Action in JSON format for me to edit it outside of the UI?是否可以以 JSON 格式导出整个操作,以便我在 UI 之外对其进行编辑? and then reimport it?然后重新导入它?

The idea is that if a have a very simple Action (with lots of scenes, but easy intends) I can define the whole action in a much simpler format and automatically create the JSON that could be imported.这个想法是,如果有一个非常简单的动作(有很多场景,但意图很简单),我可以以更简单的格式定义整个动作,并自动创建可以导入的 JSON。 It would be much faster for me than defining each scene in the Actions Console.对我来说,这比在 Actions Console 中定义每个场景要快得多。

Sort of.有点。

You can use the gactions command line tool to export and import the configuration files.您可以使用gactions命令行工具来导出和导入配置文件。 These completely represent the same things that you can edit using the web-based graphical editor.这些完全代表了您可以使用基于 Web 的图形编辑器编辑的相同内容。

However... these files are in YAML, not JSON.但是...这些文件位于 YAML 中,而不是 JSON 中。 Semantically, they're identical, so you will still be able to create something that generates the files.从语义上讲,它们是相同的,因此您仍然可以创建生成文件的内容。

To download your configuration into the current directory you'd use the gactions pull command and specify your project ID with the --project-id parameter:要将您的配置下载当前目录,您可以使用gactions pull命令并使用--project-id参数指定您的项目 ID:

gactions pull --project-id some-project-4242

You'll see that the Scenes and Intents each have their own folders under custom where you'll be doing your editing.您会看到 Scenes 和 Intents 每个都有自己的custom文件夹,您将在其中进行编辑。

Once you've made the changes, you can upload the configuration with进行更改后,您可以使用以下命令上传配置

gactions push

(Note that you can't specify the project ID, since this is in one of the configuration files.) (请注意,您不能指定项目 ID,因为它位于配置文件之一中。)

You can then reload the test simulator and test your changes.然后,您可以重新加载测试模拟器并测试您的更改。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从Google操作系统控制台上删除对某种语言的支持? - How can I delete support for a language from the Actions on Google console? 如何在 Google 控制台上的操作中删除项目? - How can I delete project in actions on google console? 无法在操作控制台模拟器中测试我的 Google Home 操作 - Can't test my Google Home Action in Actions Console Simulator 如何在 Actions on Google 控制台中启用语音输入? - How to enable voice input in Actions on Google console? 从谷歌上的操作中注销用户 - Logout the user from actions on google 谷歌的行动 - Actions on Google 如何将随机输入值作为 Google Actions NLP(谷歌助手)控制台中的插槽变量? - How can I take a random input value as a slot variable in Google Actions NLP (google assistant) Console? 操作控制台要求提供“智能家居应用”的“应用信息”,而“从操作SDK添加的操作”下没有列出“操作” - Action console asking for “app information” for “smart home app” and no “actions” listed under “actions added from actions SDK” Actions on Console 中缺少 Alpha 用户 - Alpha users missing from Actions on Console 在Google上执行的操作会从意图上打开Goog​​le Maps - Actions on Google open Google Maps from intent
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM