ภาพรวมการสร้าง
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
หากต้องการสร้างการดำเนินการแบบการสนทนา คุณต้องสร้างและติดตั้งใช้งานคอมโพเนนต์ต่อไปนี้
- โปรเจ็กต์ Actions - คอนเทนเนอร์เชิงตรรกะสำหรับ
Conversational Actions, บริการเว็บ และเว็บแอปทั้งหมด นอกจากนี้ยังกำหนดการตั้งค่าและทรัพยากรของโปรเจ็กต์ที่อธิบายวิธีทำให้โปรเจ็กต์ใช้งานได้ใน Actions on Google
- รูปแบบการเรียกใช้ - กำหนดวิธีที่ผู้ใช้ค้นพบและเริ่ม
Actions ภายในโปรเจ็กต์ คุณสร้างโมเดลการเรียกใช้ด้วยIntent และประเภท
- โมเดลการสนทนา - กำหนดสิ่งที่ผู้ใช้พูดกับ Actions ของคุณได้ และวิธีที่ Actions ตอบกลับผู้ใช้ คุณสร้างโมเดลการสนทนาด้วยเจตนา ประเภท ฉาก และพรอมต์
- Webhook - การดำเนินการสามารถทริกเกอร์ Webhook เพื่อมอบหมาย
ตรรกะเพิ่มเติมให้กับบริการจัดการคำสั่งซื้อ เช่น การสร้างพรอมต์
การตรวจสอบข้อมูล และอื่นๆ
- Canvas แบบอินเทอร์แอกทีฟ - คุณสามารถแสดงเว็บแอปแบบอินเทอร์แอกทีฟเต็มหน้าจอที่ขับเคลื่อนด้วย HTML, CSS และ JavaScript แทนการส่งการตอบกลับเป็นข้อความธรรมดาหรือริชการ์ดและรูปภาพ
ส่วนต่อไปนี้จะอธิบายเครื่องมือที่คุณจะใช้สร้าง Actions
การทำงาน
Actions API คือชุดเครื่องมือสำหรับนักพัฒนาซอฟต์แวร์ที่ใช้สร้าง Actions สำหรับ
Google Assistant โดยประกอบด้วยฟีเจอร์ต่อไปนี้
การแสดงโปรเจ็กต์ Actions แบบเปิดที่อิงตามไฟล์ - สร้างโมเดลการเรียกใช้และการสนทนาด้วยIntent, ประเภท, ฉาก และพรอมต์ คุณแก้ไขโปรเจ็กต์ Actions
ด้วยโปรแกรมแก้ไขข้อความที่ชื่นชอบ เช็คอินลงในระบบควบคุมแหล่งที่มา สร้าง
กระบวนการอัตโนมัติ และอื่นๆ ได้
อินเทอร์เฟซบรรทัดคำสั่ง (CLI) - เครื่องมือ
gactions
มี CLI สำหรับการเริ่มต้นและ
การพัฒนา Actions โดยอัตโนมัติ ซึ่งช่วยให้คุณเริ่มต้นไฟล์โปรเจ็กต์ Action
มาตรฐาน, พุชการอัปเดตไปยังคอนโซล Actions, ทำให้โปรเจ็กต์ Action ใช้งานได้
และอื่นๆ เครื่องมือนี้ช่วยให้คุณทำเวิร์กโฟลว์ทั่วไปได้หลายอย่าง เช่น การนำเข้า
โปรเจ็กต์ที่มีอยู่ หรือเริ่มทำงานในฟีเจอร์สาขาโดยใช้ระบบควบคุมแหล่งข้อมูลที่คุณชื่นชอบ
Actions API - Actions API เป็น API เดียวกับที่เครื่องมือ gactions
ใช้ Actions API มีรายการปลายทาง REST เพื่อ
จัดการ Actions รวมถึงสำหรับการทดสอบและการสร้าง API ช่วยให้คุณใช้คำขอ JSON เพื่อดำเนินการเวิร์กโฟลว์ทั่วไปหลายอย่างได้ เมื่อใช้ Actions API คุณควรพิจารณาขีดจํากัดและแนวทางปฏิบัติแนะนําบางอย่าง
Webhook และไลบรารีการดำเนินการตามคำสั่ง Node.js - Actions ของคุณสามารถมอบหมายตรรกะทางธุรกิจให้กับบริการเว็บด้วย Webhook และรูปแบบการรับส่งข้อความที่อิงตาม JSON
เรามีไลบรารีการจัดการคำสั่งซื้อ Node.js ซึ่งมีอินเทอร์เฟซที่เหมาะสมสำหรับ
Webhook ของการสนทนา ไลบรารีนี้ช่วยให้
ติดตั้งใช้งานโฟลว์ของผู้ใช้ทั่วไปหลายรายการได้ง่าย ตัวอย่างเช่น ฟีเจอร์บางอย่างรวมถึง
การแยกพารามิเตอร์จากคำค้นหาของผู้ใช้และการสร้างประสบการณ์มัลติโมดอล
(เสียงเท่านั้นและเสียงพร้อมภาพ) สำหรับ Google Assistant
เครื่องมือสร้างการดำเนินการ
Actions Builder มี IDE บนเว็บที่ทรงประสิทธิภาพและใช้งานง่าย ซึ่งผสานรวมเข้ากับคอนโซล Actions เนื่องจาก Actions Builder สร้างขึ้นจากเทคโนโลยีเดียวกับ Actions API คุณจึงใช้ Actions Builder เพียงอย่างเดียวหรือใช้ร่วมกับ Actions API ก็ได้ตามความต้องการ
UI ของ Actions Builder แบ่งออกเป็นส่วนต่างๆ ดังนี้
- เมนูด้านบนช่วยให้เข้าถึงส่วนต่างๆ ของคอนโซล Actions ได้
และคุณเข้าถึง Actions Builder ได้ในแท็บพัฒนา
- เมนูด้านซ้ายช่วยให้คุณเข้าถึงคอมโพเนนต์ทั้งหมดเพื่อสร้าง Actions เช่น
Intent และฉาก
- พื้นที่สร้างช่วยให้คุณสร้างคอมโพเนนต์ที่กำลังทำงานอยู่ได้
- พื้นที่รายละเอียดช่วยให้คุณกำหนดรายละเอียดเพิ่มเติมเกี่ยวกับคอมโพเนนต์ที่กำลัง
ทำงานอยู่ได้
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-24 UTC
[null,null,["อัปเดตล่าสุด 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."]]