Tổng quan về bản dựng
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Để tạo Thao tác đàm thoại, bạn sẽ tạo và triển khai các thành phần sau:
- Dự án Actions – Vùng chứa logic cho tất cả các Thao tác đàm thoại, dịch vụ web và ứng dụng web của bạn. Tệp này cũng xác định các chế độ cài đặt và tài nguyên của dự án, mô tả cách triển khai dự án của bạn cho Actions on Google.
- Mô hình gọi – Xác định cách người dùng khám phá và bắt đầu các Thao tác trong dự án của bạn. Bạn xây dựng mô hình lệnh gọi bằng ý định và các loại.
- Mô hình trò chuyện – Xác định những gì người dùng có thể nói với Hành động của bạn và cách Hành động của bạn phản hồi người dùng. Bạn xây dựng mô hình đàm thoại bằng ý định, loại, cảnh và lời nhắc.
- Webhook – Các hành động có thể kích hoạt webhook để uỷ quyền thêm logic cho các dịch vụ thực hiện của bạn, chẳng hạn như tạo lời nhắc, xác thực dữ liệu, v.v.
- Canvas tương tác – Thay vì gửi các phản hồi văn bản đơn giản hoặc thẻ và hình ảnh đa dạng, bạn có thể phân phối một ứng dụng web tương tác toàn màn hình dựa trên HTML, CSS và JavaScript.
Các phần sau đây mô tả những công cụ mà bạn sẽ dùng để tạo Thao tác.
Thao tác
Actions API là một bộ công cụ dành cho nhà phát triển để xây dựng các Hành động cho Trợ lý Google. Nền tảng này bao gồm các tính năng sau:
Một bản trình bày dựa trên tệp, mở của dự án Actions – Tạo mô hình lời gọi và mô hình trò chuyện bằng intent (ý định), type (loại), scene (cảnh) và prompt (lời nhắc). Bạn có thể chỉnh sửa các dự án Hành động bằng trình chỉnh sửa văn bản mà mình yêu thích, kiểm nhập các dự án đó vào hệ thống kiểm soát nguồn, tạo quy trình tự động hoá và nhiều việc khác.
Giao diện dòng lệnh (CLI) – Công cụ gactions
cung cấp một CLI để khởi động và tự động hoá quá trình phát triển các Thao tác của bạn. Công cụ này cho phép bạn khởi tạo các tệp dự án Action tiêu chuẩn, đẩy các bản cập nhật lên Actions Console, triển khai các dự án Action và làm nhiều việc khác. Công cụ này cho phép bạn thực hiện nhiều quy trình làm việc phổ biến, chẳng hạn như nhập các dự án hiện có hoặc bắt đầu làm việc trên một nhánh tính năng bằng hệ thống kiểm soát nguồn mà bạn yêu thích.
Actions API – Actions API là API mà công cụ gactions
sử dụng. Actions API cung cấp danh sách các điểm cuối REST để quản lý các Thao tác của bạn, bao gồm cả việc kiểm thử và tạo. API này cho phép bạn sử dụng các yêu cầu JSON để thực hiện nhiều quy trình làm việc phổ biến. Khi sử dụng Actions API, bạn nên cân nhắc một số giới hạn và phương pháp hay nhất.
Webhook và thư viện thực hiện Node.js – Các Hành động của bạn có thể uỷ quyền logic nghiệp vụ cho các dịch vụ web bằng webhook và định dạng nhắn tin dựa trên JSON. Chúng tôi cung cấp một thư viện thực hiện Node.js cung cấp các giao diện thành ngữ cho Webhook cuộc trò chuyện. Thư viện này giúp bạn dễ dàng triển khai nhiều quy trình phổ biến của người dùng. Ví dụ: một số tính năng bao gồm việc trích xuất các tham số từ một cụm từ tìm kiếm của người dùng và tạo ra trải nghiệm đa phương thức (chỉ bằng giọng nói và bằng cả giọng nói lẫn hình ảnh) cho Trợ lý Google.
Actions Builder
Actions Builder cung cấp cho bạn một IDE mạnh mẽ, dễ sử dụng và dựa trên web, được tích hợp vào Actions Console. Vì Actions Builder được xây dựng trên cùng công nghệ với Actions API, nên bạn có thể sử dụng riêng hoặc cùng với Actions API tuỳ theo nhu cầu.
Giao diện người dùng của Actions Builder được chia thành các khu vực sau:
- Trình đơn trên cùng cung cấp quyền truy cập vào các khu vực khác nhau của Actions Console và bạn có thể truy cập vào Actions Builder trên thẻ Phát triển.
- Trình đơn bên trái cho phép bạn truy cập vào tất cả các thành phần để tạo Hành động, chẳng hạn như ý định và cảnh.
- Vùng bản dựng cho phép bạn tạo thành phần mà bạn đang làm việc.
- Khu vực chi tiết cho phép bạn định cấu hình thêm thông tin chi tiết về thành phần mà bạn đang làm việc.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-24 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-24 UTC."],[[["\u003cp\u003eConversational Actions are built using an Actions project, an invocation model, a conversation model, webhooks, and optionally Interactive Canvas.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can utilize the Actions API, which includes an open file-based project representation, a command-line interface, a REST API, and webhook support with a Node.js library.\u003c/p\u003e\n"],["\u003cp\u003eActions Builder provides a web-based IDE within the Actions console, offering a user-friendly interface for building and managing conversational actions, integrated with the Actions API.\u003c/p\u003e\n"]]],[],null,["# Build overview\n\nTo build Conversational Actions, you create and deploy the following components:\n\n- **[Actions project](/assistant/conversational/build/projects)** - The logical container for all of your Conversational Actions, web services, and web apps. It also defines project settings and resources that describe how to deploy your project to Actions on Google.\n- **[Invocation model](/assistant/conversational/build/invocation)** - Defines how users discover and start the Actions inside your project. You build your invocation model with [intents](../intents) and [types](../types).\n- **[Conversation model](/assistant/conversational/build/conversation)** - Defines what users can say to your Actions and how your Actions respond to users. You build your conversational model with [intents](../intents), [types](../types), [scenes](../scenes), and [prompts](../prompts).\n- **[Webhooks](../webhooks)** - Actions can trigger webhooks to delegate additional logic to your fulfillment services, like generating prompts, validating data, and more.\n- **[Interactive Canvas](/assistant/interactivecanvas)** - Instead of sending simple text responses or rich cards and images, you can deliver a full-screen, interactive web app powered by HTML, CSS, and JavaScript.\n\nThe following sections describe the tools that you'll use to build Actions.\n\n### Actions\n\nThe Actions API is a set of developer tools for building Actions for the\nGoogle Assistant. It consists of the following features:\n\n- **An open, file-based representation of an Actions project** - Build your\n invocation and conversation models with\n [intents](/assistant/conversational/intents),\n [types](/assistant/conversational/types),\n [scenes](/assistant/conversational/scenes), and\n [prompts](/assistant/conversational/prompts). You can edit your Actions\n projects with your favorite text editor, check them into source control, build\n automated processes, and more.\n\n- **A command-line interface (CLI)** - The\n [`gactions` tool](/assistant/actionssdk/gactions) provides a CLI to bootstrap and\n automate development of your Actions. It lets you initialize standard Action\n project files, push updates to the Actions console, deploy Action projects,\n and more. The tool lets you perform many common workflows, such as importing\n existing projects or starting work on a feature branch using your favorite\n source control system.\n\n- **The Actions API** - The Actions API is the same API used by\n the `gactions` tool. The Actions API provides a list of REST endpoints to\n manage your Actions, including for testing and building. The API lets you use\n JSON requests to perform many common workflows. When\n [using the Actions API](/assistant/actions/api) there are\n certain limits and best practices that you should consider.\n\n- **Webhooks and a Node.js fulfillment library** - Your Actions can delegate\n business logic to your web services with webhooks and a JSON based messaging\n format. We provide a Node.js fulfillment library that provides idiomatic interfaces for the\n [Conversation Webhook](/assistant/conversational/webhooks). This library makes it\n easy to implement many common user flows. For example, some features include\n extracting parameters from a user query and generating a multimodal experience\n (voice only and voice and visuals) for Google Assistant.\n\n### Actions Builder\n\nActions Builder gives you a powerful and easy-to-use, web-based IDE that's\nintegrated into the Actions console. Since Actions Builder is built on the\nsame technologies as the Actions API, you can use it on its own or together with\nthe Actions API depending on your needs. \n\nThe Actions Builder UI is split into the following areas:\n\n1. The top menu provides access to the different areas of the Actions console, and you can access Actions Builder on the **Develop** tab.\n2. The left menu lets you access all the components to build Actions, like intents and scenes.\n3. The build area lets you build the component you're working on.\n4. The details area lets you configure more details about the component you're working on."]]