VSCode has more useful extensions than the code editors we 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).
On settings, we’ll see the following.
To work with this extension you need to type your OpenAI API key in the first box in the image above.
You can leave the remaining boxes as is, but in case you want to customize them, keep this in mind:
1. Max tokens: Maximum number of tokens you want to get for each request to the API
2. 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.
3. Temperature: Controls how much randomness is in the output (the lower the temperature, the more likely GPT-3 will choose words with a higher probability of occurrence)
Exploring CodeGPT
Here are the top features of CodeGPT
1. Generate Code: You only need to type a comment asking for a specific code, then press cmd-shift-iand CodeGPT will open a new window with the code.
2. 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.
Here’s the result
But that’s not all! Here are Other things you can do with CodeGPT:
1. Ask questions
2. Refactor code
3. Document code
4. Find problems in your code
That’s it! Now is your time to explore this extension.
How Google Search Works Google Search is used to find information on the web, including websites, images, videos, and news. Google Search works by crawling the web. Googlebot, Google’s web crawler, visits websites and collects information about them. This information includes the website’s title, content, and links to other websites. Google then stores this information in its index.
Why single threaded NodeJS? A single threaded language means it can do only one thing at a time. Then why we use a single threaded language like NodeJS to create high traffic web applications with lots of concurrent connection. Doesn’t it look counterintuitive? Don’t you think a multi-thread language like Java and C++ will be more appropriate for this use case?