CodeGPT: The VSCode Extension with ChatGPT-Like Functionalities
Made with Canva

CodeGPT: The VSCode Extension with ChatGPT-Like Functionalities

GPT-3 inside VSCode using the official OpenAI API.

I’m not a big fan of VSCode, but I have to admit that it has more useful extensions than the code editors I use on the daily basis.

One of those extensions is CodeGPT. This extension allows us to use GPT-3 inside VSCode through the official OpenAI API. This is something like having ChatGPT in our code editor!

With CodeGPT we can generate code, explain code, refactor code, and more. Let’s see how to set it up and explore all its functionalities.

Setting up CodeGPT on VSCode:

To install this extension, we have to open VSCode, go to extensions, and search “Code GPT.” Once we find it, we click on “install”.

Once Code GPT is installed, we have to go to “Settings” and go to “Code GPT” (on macOS go to the menu bar and click on Code, then select “Preferences” to find the “Settings” option).

No alt text provided for this image


On settings, we’ll see the following.

No alt text provided for this image

To work with this extension you need to type your OpenAI API key in the first box in the image above.

No alt text provided for this image
OpenAi

You can leave the remaining boxes as is, but in case you want to customize them, keep this in mind:

  • Max tokens: Maximum number of tokens you want to get for each request to the API
  • Model: Currently there are 3 models available in this extension (text-davinci-003, code-cushman-001 and code-davinci-002). Among these options code-davinci-002 is the most powerful when it comes to coding.
  • Temperature: Controls how much randomness is in the output.

Exploring CodeGPT

Here are the top features of CodeGPT

  • Generate Code: You only need to type a comment asking for a specific code, then press cmd-shift-i and CodeGPT will open a new window with the code.

  • Explain Code: Select some code, right-click on it and select the option “Explain CodeGPT.” CodeGPT will open a new window and explain the code.


No alt text provided for this image
ChatGPT

Here's the Result

No alt text provided for this image
ChatGPT


But that’s not all! Here are Other things you can do with CodeGPT:

  • Ask questions
  • Refactor code
  • Document code
  • Find problems in your code

That’s it! Now is your time to explore this extension. Let me know in the comment section what you think about CodeGPT.

Ammad Sattar

Marketing Specialist @xsolution.ai | Economist | Business Analyst | Social Media Management & Lead Generation Specialist

1 年

wow??

回复

要查看或添加评论,请登录

khalil Ur rehman的更多文章

  • How can AI be used to combat climate change?

    How can AI be used to combat climate change?

    Artificial Intelligence (AI) is a rapidly evolving field that has the potential to play a significant role in…

  • Top AI Tools in 2023

    Top AI Tools in 2023

    Exciting, and unexpected applications are being created every day as the area of AI grows. The reasons we use them are…

    1 条评论
  • 8 common mistakes Junior Software Engineers make

    8 common mistakes Junior Software Engineers make

    I wouldn't say I like leveling. Mainly because being a Senior Engineer means being old.

社区洞察

其他会员也浏览了