วิธีการทำงานของฟีเจอร์ช่วยเขียนโค้ดของ Gemini
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
โมเดลภาษาขนาดใหญ่ (LLM) ของ Gemini ที่ Gemini Code Assist ใช้ได้รับการฝึกด้วยชุดข้อมูลโค้ดที่เผยแพร่ต่อสาธารณะ เนื้อหาเฉพาะของ Google Cloud และข้อมูลทางเทคนิคอื่นๆ ที่เกี่ยวข้อง นอกเหนือจากชุดข้อมูลที่ใช้ฝึกโมเดลพื้นฐานของ Gemini
โมเดลได้รับการฝึกฝนเพื่อให้คำตอบของ Gemini Code Assist เป็นประโยชน์ต่อผู้ใช้ Gemini Code Assist มากที่สุด
Gemini Code Assist Standard และ Enterprise จะไม่ใช้พรอมต์หรือคำตอบที่สร้างขึ้นเพื่อฝึกหรือปรับแต่งโมเดลพื้นฐาน
Gemini Code Assist รุ่น Standard และ Enterprise ใช้ข้อมูลของคุณเพื่อตอบสนองต่อคำขอเท่านั้น และจะไม่จัดเก็บข้อมูลดังกล่าวเว้นแต่คุณจะระบุไว้
วิธีและเวลาที่ Gemini Code Assist อ้างอิงแหล่งที่มา
LLM ของฟีเจอร์ช่วยเขียนโค้ดของ Gemini ก็เช่นเดียวกับการใช้งาน LLM แบบสแตนด์อโลนอื่นๆ ที่มีวัตถุประสงค์ในการสร้างเนื้อหาต้นฉบับ ไม่ใช่นำเนื้อหาที่มีอยู่มาสร้างใหม่ในแบบที่ละเอียดขึ้น เราได้ออกแบบระบบให้จํากัดโอกาสในการเกิดเหตุการณ์เช่นนี้ และเราจะปรับปรุงการทํางานของระบบเหล่านี้อย่างต่อเนื่อง
หาก Gemini Code Assist ยกเนื้อหาจำนวนมากจากหน้าเว็บหนึ่งไปใช้โดยตรง ก็จะอ้างอิงหน้าเว็บนั้น สำหรับคำตอบที่มี URL ฟีเจอร์ช่วยเขียนโค้ดของ Gemini จะช่วยให้ผู้ใช้เห็นและในบางกรณีก็ให้คลิกเพื่อไปยังหน้าแหล่งที่มาได้โดยตรง
เมื่อสร้างโค้ดหรือเสนอการเติมโค้ด Gemini Code Assist จะแสดงข้อมูลการอ้างอิงเมื่อยกเนื้อหาจำนวนมากจากแหล่งที่มาอื่นโดยตรง เช่น โค้ดโอเพนซอร์สที่มีอยู่ ในกรณีที่อ้างอิงที่เก็บโค้ด การอ้างอิงอาจพูดถึงใบอนุญาตโอเพนซอร์สที่เกี่ยวข้องด้วย
Gemini Code Assist จะรวบรวมข้อมูลตามบริบทจากไฟล์ที่คุณกำลังใช้งานใน IDE รวมถึงไฟล์อื่นๆ ที่เปิดอยู่และไฟล์ในเครื่องที่เกี่ยวข้องในโปรเจ็กต์ เพื่อให้สร้างโค้ดใน IDE ได้ดียิ่งขึ้น
เมื่อใช้ฟีเจอร์ช่วยเขียนโค้ดของ Gemini ใน IDE ทาง Gemini จะแสดงรายการไฟล์โปรเจ็กต์ (แหล่งที่มาของบริบท) ที่ใช้อ้างอิงในการสร้างคำตอบสำหรับพรอมต์ แหล่งที่มาของบริบทจะแสดงทุกครั้งที่คุณใช้แชท Gemini
คุณป้องกันไม่ให้ Gemini Code Assist แนะนำโค้ดที่ตรงกับแหล่งที่มาที่อ้างอิงได้โดยปรับการตั้งค่าใน VS Code
การปรับแต่งโค้ดใน Gemini Code Assist Enterprise ช่วยให้คุณรับคำแนะนำโค้ดตามฐานโค้ดส่วนตัวขององค์กรได้โดยตรงจาก Gemini Code Assist ดูข้อมูลเพิ่มเติมเกี่ยวกับการปรับแต่งโค้ดและวิธีที่เรารักษาความปลอดภัยเมื่อเข้าถึงและจัดเก็บโค้ดส่วนตัวได้ที่ภาพรวมของฟีเจอร์ช่วยเขียนโค้ดของ Gemini
หากต้องการกําหนดค่าและใช้การปรับแต่งโค้ด โปรดดูหัวข้อกําหนดค่าและใช้การปรับแต่งโค้ดของ Gemini Code Assist
ดูข้อมูลเพิ่มเติมเกี่ยวกับการควบคุมความปลอดภัยของ Gemini Code Assist Standard และ Enterprise ได้ที่ความปลอดภัย ความเป็นส่วนตัว และการปฏิบัติตามข้อกำหนดสำหรับ Gemini Code Assist Standard และ Enterprise
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-31 UTC
[null,null,["อัปเดตล่าสุด 2025-08-31 UTC"],[[["\u003cp\u003eGemini for Google Cloud's large language models (LLMs) are trained on diverse datasets, including public code, Google Cloud-specific data, and technical information, and are designed to provide useful responses.\u003c/p\u003e\n"],["\u003cp\u003eWhen generating responses, Gemini in the Google Cloud console incorporates basic user context but does not store this contextual information persistently, ensuring data privacy.\u003c/p\u003e\n"],["\u003cp\u003eGemini for Google Cloud doesn't use user prompts or generated responses for training its models; all data sent is solely used for generating a response and is not stored unless explicitly instructed.\u003c/p\u003e\n"],["\u003cp\u003eGemini for Google Cloud cites sources when directly quoting from web pages or code, providing users with URLs and, in some cases, direct navigation to the source material, including any relevant open source licenses.\u003c/p\u003e\n"],["\u003cp\u003eGemini for Google Cloud offers Generative AI Indemnification, meaning Google assumes certain responsibility for potential legal risks if a user is challenged on copyright grounds for content generated by Gemini.\u003c/p\u003e\n"]]],[],null,["# How Gemini Code Assist works\n\nThe Gemini large language models (LLMs) that are used by\nGemini Code Assist are trained on datasets of publicly available code,\nGoogle Cloud-specific material, and other relevant technical information\nin addition to the datasets used to train the Gemini\n[foundation models](https://storage.googleapis.com/deepmind-media/gemini/gemini_1_report.pdf).\nModels are trained so that Gemini Code Assist responses are as useful\nto Gemini Code Assist users as possible.\n\nGemini Code Assist Standard and Enterprise don't use your prompts\nor generated responses for training or fine-tuning our underlying models.\nGemini Code Assist Standard and Enterprise editions use your\ndata strictly for serving a response to the request, and unless instructed by\nyou, isn't stored.\n\nHow and when Gemini Code Assist cites sources\n---------------------------------------------\n\nGemini Code Assist LLMs, like some other standalone LLM\nexperiences, are intended to generate original content and not replicate\nexisting content at length. We've designed our systems to limit the chances of\nthis occurring, and we continue to improve how these systems function.\n\nIf Gemini Code Assist directly quotes at length from a web page,\nit cites that page. For answers with URLs, Gemini Code Assist\nlets users see and, in some cases, click to navigate directly to the source\npage.\n\nWhen generating code or offering code completion,\nGemini Code Assist provides citation information when it directly\nquotes at length from another source, such as existing open source code. In the\ncase of citations to code repositories, the citation might also reference an\napplicable open source license.\n\nTo allow for better code generation in IDEs,\nGemini Code Assist gathers contextual information from the file\nthat you're actively using in your IDE as well as other open and relevant local\nfiles in your project.\n\nWhen working with Gemini Code Assist in your IDE,\nGemini lists your project files (the context sources) that were\nused as reference to generate responses to your prompts. Context sources are\nshown every time you use Gemini chat.\n\nYou can prevent Gemini Code Assist from suggesting code that\nmatches cited sources by adjusting settings in\n[VS Code](/gemini-code-assist/docs/write-code-gemini#disable_code_suggestions_that_match_cited_sources).\n\n[Code customization](/gemini-code-assist/docs/code-customization-overview) in\nGemini Code Assist Enterprise lets you get code suggestions based\non your organization's private codebase directly from\nGemini Code Assist. To learn more about code customization, and\nhow we provide security when accessing and storing your private code, see the\n[Gemini Code Assist overview](/gemini-code-assist/docs/code-customization-overview).\nTo configure and use code customization, see\n[Configure and use Gemini Code Assist code customization](/gemini-code-assist/docs/code-customization).\n\nFor more information about Gemini Code Assist Standard and\nEnterprise security controls, see\n[Security, privacy, and compliance for Gemini Code Assist Standard and Enterprise](https://cloud.google.com/gemini/docs/codeassist/security-privacy-compliance)."]]