
Prompt OpenAI's GPT-4, GPT-3.5, GPT-3 and Codex models within Visual Studio Code
This repository is meant for documentation, bug reports and feature requests
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
- You can update your commit message prompt from the extension settings. You may also opt-out if you prefer to use other commit message generators.
- `Genie: Generate a commit message` command and shortcut supports multi-folder workspaces.
### Misc.
- Update your generate commit message prompt: `genieai.promptPrefix.commit-message`
- Opt-out of the Quick Fix actions setting is added: `genieai.quickFix.enable`
- Opt-out of the Generate Commit Message functionality: `genieai.enableGenerateCommitMessage`
- All of Genie's context menu items are now wrapped under `Genie` submenu
2. Rename and remove your conversations within sidebar
- You don't need to update the `genie.json` file to update your conversation's name.
3. Improved autoscroll behaviour
- Autoscroll will be disabled if you interrupt the stream
Genie - ChatGPT Conversation History - Watch Video
>Get your API Key from here: OpenAI and see OpenAI official docs for available model details
If you face issues regarding your API Key, see FAQ for details on how to reenter/clear it
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.
We recently introduced Genie to Problems window. You can investigate your compile-time errors asking Genie. Simply click on Lightbulb/suggestion icon to ask Genie to help you. The credits for this idea goes to @cahaseler; if you are interested in seeing his Genie-companion extension visit this issue
💬 Store your conversation history on your disk and continue at any time.

💡 Quick fix the problems in your code

✨ Supports Azure OpenAI Service

🔁 See diff between your code and Genie’s suggestion right within editor with one click.

📃 Get streaming answers to your prompt in editor or sidebar conversation.

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

Automatic partial code response detection. If AI doesn’t finish responding, you will have the option to continue and combine answers

Copy or insert the code ChatGPT is suggesting right into your editor.

Ad-hoc prompt prefixes for you to customize what you are asking ChatGPT

You may assign a keyboard shortcut to any of the following commands using VS Code’s built-in keybindings menu.
Genie: Ad-hoc prompt: Ad-hoc custom prompt prefix for the selected code. Right click on a selected block of code, run command.
Genie: Add tests: Write tests for you. Right click on a selected block of code, run command.
Genie: Find bugs: Analyze and find bugs in your code. Right click on a selected block of code, run command.
Genie: Optimize: Add suggestions to your code to improve. Right click on a selected block of code, run command.
Genie: Explain: Explain the selected code. Right click on a selected block of code, run command.
Genie: Add comments: Add comments for the selected code. Right click on a selected block of code, run command.
Genie: Custom prompt 1: Your custom prompt 1. It’s disabled by default, please set to a custom prompt and enable it if you prefer using customized prompt
Genie: Custom prompt 2: Your custom prompt 2. It’s disabled by default, please set to a custom prompt and enable it if you prefer using customized prompt
Genie: Generate code: If you select a Codex model (code-*) you will see this option in your context menu. This option will not feed the ChatGPT with any context like the other text completion prompts.Genie: Clear API Key: Clears the API Key from VS Code Secrets StorageGenie: Show conversations: List of conversations that Genie stored after enabling conversation history setting.Genie: What's new: See what is recently released.Genie: Start a new chat: Start a new chat with AI.Genie: Ask anything: Free-form text questions within conversation window.Genie: Reset session: Clears the current session and resets your connection with ChatGPTGenie: Clear conversation: Clears the conversation window and resets the thread to start a new conversation with ChatGPT.Genie: Export conversation: Exports the whole conversation in Markdown for you to easily store and find the Q&A list.Genie: Focus on Genie View: Focuses on Genie window if it was hidden. You can move Genie window to right sidebar or bottom bar by dragging the Genie icon.Genie: Clear API Key command. Click Commands on the home page to see all commands available. You can also click on Change API Key on the home page.If you get HTTP 429 Too Many Requests, it means that you are either making too many requests OR your account doesn’t have enough credit. Your account may also have expired.
insufficient_quota in the error, you could run the following cURL command to check if your account has enough quota. (Make sure to replace $OPENAI_API_KEY with your key that you use in this extension) curl https://api.openai.com/v1/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "text-davinci-003",
"prompt": "Can I make a request?\n\n",
"temperature": 0.7,
"max_tokens": 256,
"top_p": 1,
"frequency_penalty": 0,
"presence_penalty": 0
}'
HTTP 404 Not Found error, it means one of the parameters you provided is unknown (i.e. genieai.openai.model). Most likely switching to default model in your settings would fix this issue.HTTP 400 Bad Request error, it means that your conversation’s length is more than GPT/Codex models can handle. Or you supplied an invalid argument via customized settings.Genie: Reset session to clear your session/conversation or Genie: Clear API Key to clear your API Key and re-entersettings.json add "remote.extensionKind": {"genieai.chatgpt-vscode": ["ui"]}