设置 (Dialogflow)
本页面介绍了如何创建 Actions 项目和配置 Dialogflow 代理。
设置 Firebase
您可以使用 Firebase CLI 这一个工具为 Interactive Canvas Action 托管 webhook 逻辑和 Web 应用。在创建 Actions 项目和 Dialogflow 代理之前,请按照 Firebase 托管使用入门中的说明安装和设置 Firebase。
创建项目
- 转到 Actions 控制台。
- 点击 New project。
- 为您的项目输入名称,然后点击 Create project。
- 点击游戏与娱乐卡片。
点击对话卡片。
![](https://developers.google.cn/static/assistant/df-asdk/interactivecanvas/images/game-type.png?hl=zh-cn)
点击顶部菜单中的部署。然后,点击目录信息。
在页面底部,勾选 Interactive Canvas 下的选项。
![](https://developers.google.cn/static/assistant/df-asdk/interactivecanvas/images/checkbox.png?hl=zh-cn)
点击顶部菜单中的概览。
点击 Build your Action,然后点击 Add Action(s)。
![](https://developers.google.cn/static/assistant/df-asdk/interactivecanvas/images/build-action.png?hl=zh-cn)
点击添加首个操作。
在内置意图下,选择玩游戏,然后点击开始使用 Dialogflow。
![](https://developers.google.cn/static/assistant/df-asdk/interactivecanvas/images/create-action.png?hl=zh-cn)
在代理创建页面上,确认代理的默认语言、时区和名称,然后点击创建。
![](https://developers.google.cn/static/assistant/df-asdk/interactivecanvas/images/create-agent.png?hl=zh-cn)
在意图页面上,点击默认欢迎意图。
![](https://developers.google.cn/static/assistant/df-asdk/interactivecanvas/images/edit-intent.png?hl=zh-cn)
在页面底部,点击 Fulfillment 以展开该部分。
点击为此意图启用 webhook 调用。
![](https://developers.google.cn/static/assistant/df-asdk/interactivecanvas/images/enable-webhook.png?hl=zh-cn)
点击保存。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2023-12-02。
[null,null,["最后更新时间 (UTC):2023-12-02。"],[[["This guide details setting up an Actions project and configuring its corresponding Dialogflow agent for Interactive Canvas integration."],["Firebase CLI is recommended for hosting both the webhook logic and web app for your Action, requiring prior setup following Firebase's guidelines."],["Project creation involves steps within the Actions console, guiding you through selecting project type and enabling Interactive Canvas features."],["Dialogflow agent configuration focuses on enabling webhook calls for the Default Welcome Intent to facilitate communication with your Action's backend."],["Users should familiarize themselves with Firebase hosting setup and the Actions console workflow to successfully create and configure their projects."]]],[]]