About code suggestions in Visual Studio Code
Copilot in Visual Studio Code provides two kinds of code suggestions:
- Code completion
- Copilot offers coding suggestions as you type. You can also describe something you want to do using natural language within a comment, and Copilot will suggest the code to accomplish your goal.
- 下一个编辑建议 (公共预览版)
- Based on the edits you are making, Copilot will predict the location of the next edit you are likely to make and suggest a completion for it. Suggestions may span a single symbol, an entire line, or multiple lines, depending on the scope of the potential change. To enable 下一个编辑建议, see 在环境中配置 GitHub Copilot.
GitHub Copilot 为多种语言和各种框架提供建议,但尤其适用于 Python、JavaScript、TypeScript、Ruby、Go、C# 和 C++。 GitHub Copilot 还可以帮助生成数据库的查询,生成 API 和框架的建议,并可以帮助开发基础结构即代码。
About code suggestions in JetBrains IDEs
Copilot offers code completion suggestions as you type.
GitHub Copilot 为多种语言和各种框架提供建议,但尤其适用于 Python、JavaScript、TypeScript、Ruby、Go、C# 和 C++。 GitHub Copilot 还可以帮助生成数据库的查询,生成 API 和框架的建议,并可以帮助开发基础结构即代码。
About code suggestions in Visual Studio
Copilot in Visual Studio provides two kinds of code suggestions:
- Code completion
- Copilot offers coding suggestions as you type.
- 下一个编辑建议 (公共预览版)
- Based on the edits you are making, Copilot will predict the location of the next edit you are likely to make and suggest a completion for it. Suggestions may span a single symbol, an entire line, or multiple lines, depending on the scope of the potential change. To enable 下一个编辑建议, see 在环境中配置 GitHub Copilot.
GitHub Copilot 为多种语言和各种框架提供建议,但尤其适用于 Python、JavaScript、TypeScript、Ruby、Go、C# 和 C++。 GitHub Copilot 还可以帮助生成数据库的查询,生成 API 和框架的建议,并可以帮助开发基础结构即代码。
About code suggestions in Vim/Neovim
GitHub Copilot provides code completion suggestions inline as you type in Vim/Neovim.
About code suggestions in Azure Data Studio
GitHub Copilot provides you with inline suggestions as you create SQL databases in Azure Data Studio.
About code suggestions in Xcode
GitHub Copilot offers code completion suggestions as you type.
About code suggestions in Eclipse
GitHub Copilot offers code completion suggestions as you type.
Code suggestions that match public code
GitHub Copilot checks each suggestion for matches with publicly available code. Any matches are discarded or suggested with a code reference, based on the setting of the "Suggestions matching public code" policy for your account or organization. See Copilot code referencing.
About the AI model used for Copilot code completion
Copilot code completion uses the GPT-4o Copilot model. This is a fine-tuned version of the GPT-4o mini model. The GPT-4o Copilot model was trained on a wide range of high quality public GitHub repositories, providing coverage of over 30 programming languages. See Programming languages included in the default model below.
Changing the model used for code completion
You can switch the AI model that's used by Copilot code completion if:
- An alternative model is currently available
- You are using the latest releases of VS Code with the latest version of the GitHub Copilot extension
Changing the model only affects Copilot code completion. It does not affect Copilot next edit suggestions.
注意
The list of available models will change over time. When only one code completion model is available, the model picker will only show that model. Preview models and additional code completion models will be added to the picker as they become available.
For details of how to switch the model for Copilot code completion, see 更改 Copilot 代码补全的 AI 模型.
Effects of switching the AI model
Changing the model that's used for Copilot code completion does not affect the model that's used by Copilot next edit suggestions or Copilot Chat. See 正在更改 Copilot Chat 的 AI 模型.
There are no changes to the data collection and usage policy if you change the AI model.
If you are on a Copilot 免费版 plan, all completions count against your completions quota regardless of the model used. See Plans for GitHub Copilot.
The setting to enable or disable suggestions that match public code are applied irrespective of which model you choose. See 查找与 GitHub Copilot 建议匹配的公开代码.
Enabling the model switcher
If you have a Copilot 免费版 or Copilot 专业版 plan, the model switcher for Copilot code completion is automatically enabled.
如果你使用 Copilot Business 或 Copilot Enterprise 计划,则为你提供计划的组织或企业必须启用“Editor preview features”设置****。 请参阅“管理组织中的 Copilot 策略””或“Managing policies and features for Copilot in your enterprise””。
Changing the model used for code completion
You can switch the AI model that's used by Copilot code completion if:
- An alternative model is currently available
- You are using Visual Studio 17.14 Preview 2 or later
注意
The list of available models will change over time. When only one code completion model is available, the model picker will only show that model. Preview models and additional code completion models will be added to the picker as they become available.
For details of how to switch the model for Copilot code completion, see 更改 Copilot 代码补全的 AI 模型.
Effects of switching the AI model
Changing the model that's used for Copilot code completion does not affect the model that's used by Copilot next edit suggestions or Copilot Chat. See 正在更改 Copilot Chat 的 AI 模型.
There are no changes to the data collection and usage policy if you change the AI model.
If you are on a Copilot 免费版 plan, all completions count against your completions quota regardless of the model used. See Plans for GitHub Copilot.
The setting to enable or disable suggestions that match public code are applied irrespective of which model you choose. See 查找与 GitHub Copilot 建议匹配的公开代码.
Enabling the model switcher
If you have a Copilot 免费版 or Copilot 专业版 plan, the model switcher for Copilot code completion is automatically enabled.
如果你使用 Copilot Business 或 Copilot Enterprise 计划,则为你提供计划的组织或企业必须启用“Editor preview features”设置****。 请参阅“管理组织中的 Copilot 策略””或“Managing policies and features for Copilot in your enterprise””。
Changing the model used for code completion
You can switch the AI model that's used by Copilot code completion if:
- An alternative model is currently available
- You are using the latest release of JetBrains IDEs with the latest version of the GitHub Copilot extension
注意
The list of available models will change over time. When only one code completion model is available, the model picker will only show that model. Preview models and additional code completion models will be added to the picker as they become available.
For details of how to switch the model for Copilot code completion, see 更改 Copilot 代码补全的 AI 模型.
Effects of switching the AI model
Changing the model that's used for Copilot code completion does not affect the model that's used by Copilot next edit suggestions or Copilot Chat. See 正在更改 Copilot Chat 的 AI 模型.
There are no changes to the data collection and usage policy if you change the AI model.
If you are on a Copilot 免费版 plan, all completions count against your completions quota regardless of the model used. See Plans for GitHub Copilot.
The setting to enable or disable suggestions that match public code are applied irrespective of which model you choose. See 查找与 GitHub Copilot 建议匹配的公开代码.
Enabling the model switcher
If you have a Copilot 免费版 or Copilot 专业版 plan, the model switcher for Copilot code completion is automatically enabled.
如果你使用 Copilot Business 或 Copilot Enterprise 计划,则为你提供计划的组织或企业必须启用“Editor preview features”设置****。 请参阅“管理组织中的 Copilot 策略””或“Managing policies and features for Copilot in your enterprise””。
Programming languages included in the default model
The following programming languages and technologies are included in the training data for the default LLM used for Copilot code completion:
- C
- C#
- C++
- Clojure
- CSS
- Dart
- Dockerfile
- Elixir
- Emacs Lisp
- Go
- Haskell
- HTML
- Java
- JavaScript
- Julia
- Jupyter Notebook
- Kotlin
- Lua
- MATLAB
- Objective-C
- Perl
- PHP
- PowerShell
- Python
- R
- Ruby
- Rust
- Scala
- Shell
- Swift
- TeX
- TypeScript
- Vue