SlideShare uma empresa Scribd logo
1 de 11
GitHub Copilot 分享
https://copilot.github.com/
What is GitHub Copilot
什么是GitHub Copilot?
GitHub Copilot is an AI pair programmer that helps you write code faster and with less work.
GitHub Copilot draws context from comments and code, and suggests individual lines and whole
functions instantly. GitHub Copilot is powered by OpenAI Codex, a new AI system created by
OpenAI. The GitHub Copilot technical preview is available as an extension for Visual Studio
Code, Neovim, and the JetBrains suite of IDEs.
GitHub Copilot是一个人工智能结对程序员,可以帮助你更快地编写代码,减少工作量。GitHub
Copilot从注释和代码中提取上下文,并立即建议个别行和整个函数。GitHub Copilot由OpenAI
Codex驱动,这是一个由OpenAI创建的新的人工智能系统。GitHub Copilot技术预览版可作为
Visual Studio Code、Neovim和JetBrains IDE套件的扩展。
How does GitHub Copilot work?
GitHub Copilot是如何工作的
OpenAI Codex was trained on publicly available source code and natural language, so it
understands both programming and human languages. The GitHub Copilot editor extension
sends your comments and code to the GitHub Copilot service, which then uses OpenAI Codex to
synthesize and suggest individual lines and whole functions.
OpenAI Codex是根据公开的源代码和自然语言进行训练的,所以它既能理解编程,也能理解人类
语言。GitHub Copilot编辑器扩展将您的评论和代码发送到GitHub Copilot服务,然后它使用
OpenAI Codex来合成和建议个别行和整个功能。
How good is GitHub
Copilot?GitHub Copilot有多
好?
We recently benchmarked against a set of Python functions that have good test coverage in open
source repos. We blanked out the function bodies and asked GitHub Copilot to fill them in. The
model got this right 43% of the time on the first try, and 57% of the time when allowed 10
attempts. And it’s getting smarter all the time.
我们最近对一组Python函数进行了基准测试,这些函数在开放源码仓库中有很好的测试覆盖率。我
们将函数主体留空,并要求GitHub Copilot将其填入。该模型在第一次尝试时有43%的时间是正确
的,而在允许10次尝试时有57%的时间是正确的。而且它还在不断地变得更聪明。
Does GitHub Copilot write
perfect code?
Github Copilot能写完美的代码吗
No. GitHub Copilot tries to understand your intent and to generate the best code it can, but
the code it suggests may not always work, or even make sense. While we are working
hard to make GitHub Copilot better, code suggested by GitHub Copilot should be carefully
tested, reviewed, and vetted, like any other code. As the developer, you are always in
charge.
GitHub Copilot 试图理解您的意图并生成它所能提供的最佳代码,但它所建议的代码不一定
有效,甚至没有意义。虽然我们正在努力使GitHub Copilot变得更好,但GitHub Copilot建议
的代码应该像其他代码一样被仔细测试、审查和审核。作为开发者,你始终是负责人。
How do I get the most out of GitHub
Copilot?
我怎样才能最大限度地利用GitHub
Copilot?
It works best when you divide your code into small functions, use meaningful
names for functions parameters, and write good docstrings and comments as
you go. It also seems to do best when it’s helping you navigate unfamiliar
libraries or frameworks.
当你把你的代码分成小的函数,为函数参数使用有意义的名字,并在使用过程
中写好文档和注释时,它的效果最好。当它帮助你浏览不熟悉的库或框架时,
它似乎也能发挥最大作用。
What context does GitHub Copilot use
to generate suggestions?
GitHub Copilot使用什么上下文环境来
生成建议代码?
GitHub Copilot uses the current file as context when making its suggestions.
It does not yet use other files in your project as inputs for synthesis. This
means that, for example, copy/pasting a type declaration into the file you’re
working on may improve suggestions from GitHub Copilot. This is something
we will improve in the future.
GitHub Copilot在提出建议代码时使用当前文件作为上下文。它还不使用你项
目中的其他文件作为合成的输入。这意味着,例如,将一个类型声明复制/粘贴
到你正在处理的文件中可能会改善GitHub Copilot的建议。这一点我们将在未
来加以改进。
GitHub Copilot的局限
性
GitHub Copilot只能容纳非常有限的上下文,所以即使是超过几百行的单个源文件
也会被裁切,只使用紧接着的上下文。而且GitHub Copilot可能会建议使用旧的或
废弃的库和语言。你可以在任何地方使用这些代码,但你要自己承担风险。
真实用户的使用例子
Github copilot
Github copilot

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

ChatGPT, Generative AI and Microsoft Copilot: Step Into the Future - Geoff Ab...
ChatGPT, Generative AI and Microsoft Copilot: Step Into the Future - Geoff Ab...ChatGPT, Generative AI and Microsoft Copilot: Step Into the Future - Geoff Ab...
ChatGPT, Generative AI and Microsoft Copilot: Step Into the Future - Geoff Ab...
 
Gitops: the kubernetes way
Gitops: the kubernetes wayGitops: the kubernetes way
Gitops: the kubernetes way
 
GitHub Basics - Derek Bable
GitHub Basics - Derek BableGitHub Basics - Derek Bable
GitHub Basics - Derek Bable
 
Difference between Github vs Gitlab vs Bitbucket
Difference between Github vs Gitlab vs BitbucketDifference between Github vs Gitlab vs Bitbucket
Difference between Github vs Gitlab vs Bitbucket
 
Unlocking the Power of ChatGPT and AI in Testing - NextSteps, presented by Ap...
Unlocking the Power of ChatGPT and AI in Testing - NextSteps, presented by Ap...Unlocking the Power of ChatGPT and AI in Testing - NextSteps, presented by Ap...
Unlocking the Power of ChatGPT and AI in Testing - NextSteps, presented by Ap...
 
Webinar on ChatGPT.pptx
Webinar on ChatGPT.pptxWebinar on ChatGPT.pptx
Webinar on ChatGPT.pptx
 
Introduction to GitHub Actions
Introduction to GitHub ActionsIntroduction to GitHub Actions
Introduction to GitHub Actions
 
Gitlab ci, cncf.sk
Gitlab ci, cncf.skGitlab ci, cncf.sk
Gitlab ci, cncf.sk
 
⼤語⾔模型 LLM 應⽤開發入⾨
⼤語⾔模型 LLM 應⽤開發入⾨⼤語⾔模型 LLM 應⽤開發入⾨
⼤語⾔模型 LLM 應⽤開發入⾨
 
200109-Open AI Chat GPT.pptx
200109-Open AI Chat GPT.pptx200109-Open AI Chat GPT.pptx
200109-Open AI Chat GPT.pptx
 
Introduction to Git and GitHub
Introduction to Git and GitHubIntroduction to Git and GitHub
Introduction to Git and GitHub
 
Introducing GitLab
Introducing GitLabIntroducing GitLab
Introducing GitLab
 
GitHub Presentation
GitHub PresentationGitHub Presentation
GitHub Presentation
 
GitOps 101 Presentation.pdf
GitOps 101 Presentation.pdfGitOps 101 Presentation.pdf
GitOps 101 Presentation.pdf
 
Introducing GitLab (June 2018)
Introducing GitLab (June 2018)Introducing GitLab (June 2018)
Introducing GitLab (June 2018)
 
Github Copilot vs Amazon CodeWhisperer for Java developers at JCON 2023
Github Copilot vs Amazon CodeWhisperer for Java developers at JCON 2023Github Copilot vs Amazon CodeWhisperer for Java developers at JCON 2023
Github Copilot vs Amazon CodeWhisperer for Java developers at JCON 2023
 
Difference between gitlab vs github vs bitbucket
Difference between gitlab vs github vs bitbucketDifference between gitlab vs github vs bitbucket
Difference between gitlab vs github vs bitbucket
 
Continuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CIContinuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CI
 
Container based CI/CD on GitHub Actions
Container based CI/CD on GitHub ActionsContainer based CI/CD on GitHub Actions
Container based CI/CD on GitHub Actions
 
DevOps with GitHub Actions
DevOps with GitHub ActionsDevOps with GitHub Actions
DevOps with GitHub Actions
 

Semelhante a Github copilot

SPOTLIGHT IGNITE (10 MINUTES): THE FUTURE OF DEVELOPER TOOLS: FROM STACKOVERF...
SPOTLIGHT IGNITE (10 MINUTES): THE FUTURE OF DEVELOPER TOOLS: FROM STACKOVERF...SPOTLIGHT IGNITE (10 MINUTES): THE FUTURE OF DEVELOPER TOOLS: FROM STACKOVERF...
SPOTLIGHT IGNITE (10 MINUTES): THE FUTURE OF DEVELOPER TOOLS: FROM STACKOVERF...
DevOpsDays Tel Aviv
 
Git Tutorial A Comprehensive Guide for Beginners.pdf
Git Tutorial A Comprehensive Guide for Beginners.pdfGit Tutorial A Comprehensive Guide for Beginners.pdf
Git Tutorial A Comprehensive Guide for Beginners.pdf
uzair
 

Semelhante a Github copilot (20)

orlando-codecamp-meet-copilot-24-Feb-2024_pub.pptx
orlando-codecamp-meet-copilot-24-Feb-2024_pub.pptxorlando-codecamp-meet-copilot-24-Feb-2024_pub.pptx
orlando-codecamp-meet-copilot-24-Feb-2024_pub.pptx
 
Can AI Autogenerate and Run Automated Tests?
Can AI Autogenerate and Run Automated Tests?Can AI Autogenerate and Run Automated Tests?
Can AI Autogenerate and Run Automated Tests?
 
CICD Pipeline Using Github Actions
CICD Pipeline Using Github ActionsCICD Pipeline Using Github Actions
CICD Pipeline Using Github Actions
 
Github 101 An Adventurer's Guide To Open Source
Github 101   An Adventurer's Guide To Open SourceGithub 101   An Adventurer's Guide To Open Source
Github 101 An Adventurer's Guide To Open Source
 
What is github.
What is github.What is github.
What is github.
 
Introduction to Github Actions
Introduction to Github ActionsIntroduction to Github Actions
Introduction to Github Actions
 
Introduction to Github Actions
Introduction to Github ActionsIntroduction to Github Actions
Introduction to Github Actions
 
GitHub Integration for Orangescrum Cloud Released!
GitHub Integration for Orangescrum Cloud Released!GitHub Integration for Orangescrum Cloud Released!
GitHub Integration for Orangescrum Cloud Released!
 
SPOTLIGHT IGNITE (10 MINUTES): THE FUTURE OF DEVELOPER TOOLS: FROM STACKOVERF...
SPOTLIGHT IGNITE (10 MINUTES): THE FUTURE OF DEVELOPER TOOLS: FROM STACKOVERF...SPOTLIGHT IGNITE (10 MINUTES): THE FUTURE OF DEVELOPER TOOLS: FROM STACKOVERF...
SPOTLIGHT IGNITE (10 MINUTES): THE FUTURE OF DEVELOPER TOOLS: FROM STACKOVERF...
 
Beginner Workshop for Student Developers - Tratech-presentation.pdf
Beginner Workshop for Student Developers - Tratech-presentation.pdfBeginner Workshop for Student Developers - Tratech-presentation.pdf
Beginner Workshop for Student Developers - Tratech-presentation.pdf
 
Github developing stack
Github developing stackGithub developing stack
Github developing stack
 
Smile Gupta - Hacktoberfest Celebration 2020
Smile Gupta - Hacktoberfest Celebration 2020Smile Gupta - Hacktoberfest Celebration 2020
Smile Gupta - Hacktoberfest Celebration 2020
 
Advance workshop on git
Advance workshop on gitAdvance workshop on git
Advance workshop on git
 
Secure Your Open Source Projects For Free
Secure Your Open Source Projects For FreeSecure Your Open Source Projects For Free
Secure Your Open Source Projects For Free
 
Github Developer Pack
Github Developer PackGithub Developer Pack
Github Developer Pack
 
github student developer pack with student benifits
github student developer pack with student benifitsgithub student developer pack with student benifits
github student developer pack with student benifits
 
GitHub for partners
GitHub for partnersGitHub for partners
GitHub for partners
 
Open Source Security and ChatGPT-Published.pdf
Open Source Security and ChatGPT-Published.pdfOpen Source Security and ChatGPT-Published.pdf
Open Source Security and ChatGPT-Published.pdf
 
Git Tutorial A Comprehensive Guide for Beginners.pdf
Git Tutorial A Comprehensive Guide for Beginners.pdfGit Tutorial A Comprehensive Guide for Beginners.pdf
Git Tutorial A Comprehensive Guide for Beginners.pdf
 
Programming tools for developers
Programming tools for developersProgramming tools for developers
Programming tools for developers
 

Último

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Último (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 

Github copilot

  • 2. What is GitHub Copilot 什么是GitHub Copilot? GitHub Copilot is an AI pair programmer that helps you write code faster and with less work. GitHub Copilot draws context from comments and code, and suggests individual lines and whole functions instantly. GitHub Copilot is powered by OpenAI Codex, a new AI system created by OpenAI. The GitHub Copilot technical preview is available as an extension for Visual Studio Code, Neovim, and the JetBrains suite of IDEs. GitHub Copilot是一个人工智能结对程序员,可以帮助你更快地编写代码,减少工作量。GitHub Copilot从注释和代码中提取上下文,并立即建议个别行和整个函数。GitHub Copilot由OpenAI Codex驱动,这是一个由OpenAI创建的新的人工智能系统。GitHub Copilot技术预览版可作为 Visual Studio Code、Neovim和JetBrains IDE套件的扩展。
  • 3. How does GitHub Copilot work? GitHub Copilot是如何工作的 OpenAI Codex was trained on publicly available source code and natural language, so it understands both programming and human languages. The GitHub Copilot editor extension sends your comments and code to the GitHub Copilot service, which then uses OpenAI Codex to synthesize and suggest individual lines and whole functions. OpenAI Codex是根据公开的源代码和自然语言进行训练的,所以它既能理解编程,也能理解人类 语言。GitHub Copilot编辑器扩展将您的评论和代码发送到GitHub Copilot服务,然后它使用 OpenAI Codex来合成和建议个别行和整个功能。
  • 4. How good is GitHub Copilot?GitHub Copilot有多 好? We recently benchmarked against a set of Python functions that have good test coverage in open source repos. We blanked out the function bodies and asked GitHub Copilot to fill them in. The model got this right 43% of the time on the first try, and 57% of the time when allowed 10 attempts. And it’s getting smarter all the time. 我们最近对一组Python函数进行了基准测试,这些函数在开放源码仓库中有很好的测试覆盖率。我 们将函数主体留空,并要求GitHub Copilot将其填入。该模型在第一次尝试时有43%的时间是正确 的,而在允许10次尝试时有57%的时间是正确的。而且它还在不断地变得更聪明。
  • 5. Does GitHub Copilot write perfect code? Github Copilot能写完美的代码吗 No. GitHub Copilot tries to understand your intent and to generate the best code it can, but the code it suggests may not always work, or even make sense. While we are working hard to make GitHub Copilot better, code suggested by GitHub Copilot should be carefully tested, reviewed, and vetted, like any other code. As the developer, you are always in charge. GitHub Copilot 试图理解您的意图并生成它所能提供的最佳代码,但它所建议的代码不一定 有效,甚至没有意义。虽然我们正在努力使GitHub Copilot变得更好,但GitHub Copilot建议 的代码应该像其他代码一样被仔细测试、审查和审核。作为开发者,你始终是负责人。
  • 6. How do I get the most out of GitHub Copilot? 我怎样才能最大限度地利用GitHub Copilot? It works best when you divide your code into small functions, use meaningful names for functions parameters, and write good docstrings and comments as you go. It also seems to do best when it’s helping you navigate unfamiliar libraries or frameworks. 当你把你的代码分成小的函数,为函数参数使用有意义的名字,并在使用过程 中写好文档和注释时,它的效果最好。当它帮助你浏览不熟悉的库或框架时, 它似乎也能发挥最大作用。
  • 7. What context does GitHub Copilot use to generate suggestions? GitHub Copilot使用什么上下文环境来 生成建议代码? GitHub Copilot uses the current file as context when making its suggestions. It does not yet use other files in your project as inputs for synthesis. This means that, for example, copy/pasting a type declaration into the file you’re working on may improve suggestions from GitHub Copilot. This is something we will improve in the future. GitHub Copilot在提出建议代码时使用当前文件作为上下文。它还不使用你项 目中的其他文件作为合成的输入。这意味着,例如,将一个类型声明复制/粘贴 到你正在处理的文件中可能会改善GitHub Copilot的建议。这一点我们将在未 来加以改进。
  • 8. GitHub Copilot的局限 性 GitHub Copilot只能容纳非常有限的上下文,所以即使是超过几百行的单个源文件 也会被裁切,只使用紧接着的上下文。而且GitHub Copilot可能会建议使用旧的或 废弃的库和语言。你可以在任何地方使用这些代码,但你要自己承担风险。