GitHub's new product Copilot is here! This product was jointly developed by GitHub and OpenAI, and the technology preview version is currently online. The tool embedded in the Visual Studio Code editor and can automatically complete code snippets.
GitHub says that Copilot is not just parroting the code it has seen before. It will analyze the code that the user has written and generate new matching codes, including specific functions that have been called before. Examples on the project website include automatically writing code to import tweets, drawing scatter plots, and getting Goodreads scores.
Its main functions include:
- Extract the code context and give suggestions for the completion of the entire line of code or the entire function;
- Convert comments into code;
- Automatically fill in duplicate codes;
- Write a test;
- Quickly find alternative ways to solve the problem;
- Quickly explore new APIs without searching on the Internet;
- Adapt to the way users write code and help users complete their work faster.
GitHub CEO Nat Friedman stated in his blog that GitHub Copilot is suitable for a wide range of frameworks and languages, but the technology preview version currently released is especially suitable for Python, JavaScript, TypeScript, Ruby and Go.
GitHub thinks this is the evolution . Pair programming means that two programmers work on the same project, catch each other's mistakes and speed up the development process, while Copilot converts the other programmer into a virtual form.
Microsoft and OpenAI's partnership
In 2019, Microsoft announced a $1 billion investment in OpenAI, and the Copilot project is the first major result of this investment. OpenAI is a research company, now led by Sam Altman, the former president of Y Combinator. Since Altman took power, OpenAI has shifted from a non-profit organization to a "capped-profi" model and accepted Microsoft's investment. In September 2020, Microsoft obtained an exclusive license for the OpenAI GPT-3 language model. (GPT-3 is an autoregressive language model with 175 billion parameters. It has demonstrated excellent performance on multiple NLP data sets, and the generated articles cannot even be distinguished from authenticity.)
Copilot is based on a new algorithm called OpenAI Codex, and uses trillions of publicly available codes extracted from GitHub entropy and English examples for training.
Copilot working principle
Codex is known as the descendant of GPT-3. The difference is that GPT-3 mainly generates text, while OpenAI Codex generates code. A representative of OpenAI said that OpenAI plans to release a Codex version through its API later this summer to help developers build their own applications using this technology.
Possible problems with Copilot
Copilot’s productivity gains have received a lot of praise, but GitHub hinted that not all code has been reviewed for bugs, unsafe practices, or personal data. GitHub says it has installed filters to prevent Copilot from generating offensive language, but this may not be perfect.
The Copilot website stated: “Due to the pre-release nature of the underlying technology, GitHub Copilot may sometimes produce undesirable output, including biased, discriminatory, abusive or offensive output.”
The GPT-3 model has received some criticism for its biases and abusive language patterns, but OpenAI does not seem to have found a way to prevent the algorithm from inheriting the worst elements in the training data. OpenAI also warns that the model may suggest email addresses, API keys, or phone numbers, but this rarely happens, and the data is synthetic or pseudo-randomly generated by an algorithm. But the code generated by Copilot is largely original. A test conducted by GitHub found that only 0.1% of the generated code coincided with the code in the training set.
Copilot is not the first project to help programmers through automatic code generation. The startup Kite has introduced a very similar feature, available on more than 16 code editors.
At present, Copilot is still in a limited technical preview stage. Users can register on the project website to get access.
Website address: https://copilot.github.com/
Reference link:
https://www.theverge.com/2021/6/29/22555777/github-openai-ai-tool-autocomplete-code
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。