Gemini Code Assist 的运作方式
使用集合让一切井井有条 根据您的偏好保存内容并对其进行分类。
Gemini Code Assist 使用的 Gemini 大语言模型 (LLM) 是基于公开可用代码、Google Cloud 专用资料和其他相关技术信息的数据集进行训练,此外还有用于训练 Gemini 基础模型的数据集。模型经过训练,以使 Gemini Code Assist 回答对 Gemini Code Assist 用户尽可能有用。
Gemini Code Assist Standard 和 Enterprise 不会使用您的提示或生成的回答来训练或微调我们的底层模型。Gemini Code Assist Standard 和 Enterprise 版本会严格将您的数据用于提供对请求的回答,除非您指示,否则不会存储。
Gemini Code Assist 会注明信息来源的情况和方式
与某些其他独立的 LLM 体验一样,Gemini Code Assist LLM 旨在生成原创内容,而不是长篇大论地复制现有内容。我们对自己的系统进行了精心设计,以尽量避免发生这种情况,而且我们将继续改进这些系统的运作方式。
如果 Gemini Code Assist 直接从网页上引用大段内容,则会注明引用的网页。如果回答包含网址,Gemini Code Assist 可让用户查看每个网址的来源;在某些情况下,用户还可以点击网址,直达相关来源页面。
在生成代码或提供代码补全功能时,Gemini Code Assist 会在直接引用其他来源(例如现有开源代码)的长篇内容时提供引用信息。如果此类功能引用了代码库,则引用中还可能提及适用的开源许可。
为了在 IDE 中更好地生成代码,Gemini Code Assist 会从您在 IDE 中正在使用的文件以及项目中其他打开的相关本地文件中收集上下文信息。
在 IDE 中使用 Gemini Code Assist 时,Gemini 会列出用作参考以生成提示回答的项目文件(上下文来源)。每当您使用 Gemini 对话时,系统都会显示上下文来源。
您可以通过调整 VS Code 中的设置,阻止 Gemini Code Assist 提供与引用来源内容一致的代码建议。
借助 Gemini Code Assist Enterprise 中的代码自定义功能,您可以直接从 Gemini Code Assist 获取基于贵组织的私有代码库的代码建议。如需详细了解代码自定义以及我们在访问和存储您的私有代码时如何提供安全保障,请参阅 Gemini Code Assist 概览。如需配置和使用代码自定义功能,请参阅配置和使用 Gemini Code Assist 代码自定义功能。
如需详细了解 Gemini Code Assist Standard 和 Enterprise 安全控件,请参阅 Gemini Code Assist Standard 和 Enterprise 的安全性、隐私权和合规性。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-29。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-07-29。"],[[["\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,["The 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\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)."]]