ChatGPT, GPT-3 and Codex conversations in Visual Studio Code
<a href="https://discord.gg/GuEdNDHQaM" title="Join Discord">
<img src="https://discordapp.com/api/guilds/1081195390734438510/widget.png?style=shield" />
</a>
<a href="https://marketplace.visualstudio.com/items?itemName=gencay.vscode-chatgpt" alt="Marketplace version">
<img src="https://img.shields.io/visual-studio-marketplace/v/gencay.vscode-chatgpt?color=orange&label=VS%20Code%20Marketplace" />
</a>
<a href="https://marketplace.visualstudio.com/items?itemName=gencay.vscode-chatgpt" alt="Marketplace download count">
<img src="https://img.shields.io/visual-studio-marketplace/d/gencay.vscode-chatgpt?color=blueviolet&label=Downloads" />
</a>
<a href="https://github.com/gencay/vscode-chatgpt" alt="Github star count">
<img src="https://img.shields.io/github/stars/gencay/vscode-chatgpt?color=blue&label=Github%20Stars" />
</a>
Testimonials
❄️ Featured by Snowflake on Medium blogpost
🎌 Blogpost VSCode に ChatGPT の拡張機能を入れてコードレビューやバグを発見してもらう
💙 Reviews on Twitter
❤️ ChatGPT the pair programmer - VS Code on Youtube
💙 Generative AI on LinkedIn

🍀 ChatGPT Plus GPT-4 is now available via Browser autologin
GPT-4 is only available on browser.

🚀 Official ChatGPT API / GPT 3.5 Turbo support
✋ Stop generating feature + Disabling autoscroll
code- model is selected: ChatGPT-Codex: Generate codectrl+shift+a or cmd+shift+a to ask GPT to generate code 👆💬💬 Access all of your ChatGPT conversation history
Keybindings, new custom prompts and enable/disable prompts
cmd+k cmd+shift+1 to run ChatGPT: Add Tests on the selected code on MacOS)Use OpenAI API key integration - Use your personal/organizational API Keys. This method provides many parameters to customize your prompt. Check out the GPT3 settings. For more details how to set it up: GPT3 OpenAI API Key. See below for the models available today:| Available model | Description | Max token | Knowledge |
|---|---|---|---|
| gpt-3.5-turbo | Most capable GPT-3.5 model and optimized for chat at 1/10th the cost of text-davinci-003. Will be updated with our latest model iteration. |
4,096 | Sep 2021 |
| gpt-3.5-turbo-0301 | Snapshot of gpt-3.5-turbo from March 1st 2023. Unlike gpt-3.5-turbo, this model will not receive updates, and will only be supported for a three month period ending on June 1st 2023. |
4,096 | Sep 2021 |
| text-davinci-003 | Can do any language task with better quality, longer output, and consistent instruction-following than the curie, babbage, or ada models. | 4,000 | Jun 2021 |
| text-davinci-002 | Similar capabilities to text-davinci-003 but trained with supervised fine-tuning instead of reinforcement learning |
4,000 | Jun 2021 |
| code-davinci-002 | Optimized for code-completion tasks | 4,000 | Jun 2021 |
| code-cushman-001 | Almost as capable as Davinci Codex, but slightly faster. This speed advantage may make it preferable for real-time applications. | 2,048 |
Use browser integration - Uses browser to ask questions to ChatGPT. Zero-Config Autologin lets the extension grab the required tokens automatically using puppeteer. The extension will use the browser behind the scenes, so you are not expected to receive 4xx errors while asking ChatGPT via extension unless there is OpenAI outages. Autologin Setup (Default)| Available model | Description |
|---|---|
| text-davinci-002-render-sha | The default ChatGPT web model. |
| text-davinci-002-render-paid | The Turbo ChatGPT web model. You need an OpenAI Plus subscription for this. Learn more . |
Get your API Key ready from here: OpenAI
Login in your extension or ask any coding question by selecting a code fragment.❕ Please do not interrupt the autologin flow and do not close the browser. Let the extension log you in and the browser will be minimized automatically. ➕ Magic Links with ChatGPT Plus subscriptions should be opened on the same tab the extension is opening. Do not click it from your email. Just copy and paste it into the same browser extension is using.
🚀 All you need to do is click Login or ask a question to get started!
Click on the ChatGPT extension icon on your sidebar and hit Login button.
A new browser window (Default is Chrome but you may override it with any Chromium-based browser) will open up redirected to https://chat.openai.com/. Wait till you see login page, and click on Login on your browser.
If you see a ChatGPT is at capacity right now message, the extension will refresh the page every 2 seconds until it's passed. If OpenAI systems are experiencing issues and the extension fails to see Login page after 10 retries, the browser will be automatically closed.
If you are ChatGPT Plus subscriber, you may enter your email address to receive a Magic Link. Open that link in the same tab that the extension opens for Browser auto-login. Do not click on it from your email, since clicking will deactivate it and you will need to request a new link. This is required for the extension to be able to use the browser it opened for asking questions to ChatGPT.
Solve captchas if you are prompted and continue.
After successfully logging in, the browser will be minimized.
🔑 Use Google, Microsoft or standard OpenAI credentials to login. The email/password will be used to autofill the login form depending on the authentication type you choose. NOTE: We don't recommend storing your password in your settings.json since the file is plain text. However, you can opt-in to use it to reduce the friction during logins.
❗ You will need to have the browser open and be logged in at all times. If you close the browser or your VS-Code instance, you will be asked to login again in your next session.
📝 You can have the extension auto-fill the email address and/or password during logins. Update the extension settings with those information for quicker login. NOTE: We never store any of this information locally or remotely.
🤖 Below is a sample autologin flow. Simply login & keep your browser minimized for dialogues with ChatGPT:

The extension comes with context menu commands, copy/move suggested code into editor with one-click, conversation window and customization options for OpenAI's ChatGPT prompts.
Browser Auto-login method to access all of your ChatGPT conversations.Show conversations.

Customize what you are asking with the selected code. The extension will remember your prompt for subsequent questions.

The extension will detect if ChatGPT didn't complete code in their answer and it will suggest automatic continuation and combination of answers




ChatGPT: Ad-hoc prompt: Ad-hoc custom prompt prefix for the selected code. Right click on a selected block of code, run command.ChatGPT: Add tests: Write tests for you. Right click on a selected block of code, run command.ChatGPT: Find bugs: Analyze and find bugs in your code. Right click on a selected block of code, run command.ChatGPT: Optimize: Add suggestions to your code to improve. Right click on a selected block of code, run command.ChatGPT: Explain: Explain the selected code. Right click on a selected block of code, run command.$ claude mcp add vscode-chatgpt \
-- python -m otcore.mcp_server <graph>