This is a VSCode extension that supports OpenAI's GPT-4, GPT-3.5 models.
It allows configuration of apiKey, model, temperature, and maxTokens in the plugin settings.
It supports both Chinese and English languages.
It comes with a built-in free API Key, with no need for registration, no login, and no payment required for use.
Commands:
ChatGPT: Update APIKey (It will provide you with a prompt to enter a new API Key and will validate the remaining balance and validity of the API Key you currently input.)
ChatGPT: Validate APIKey (Validate the remaining balance and validity of the current API Key)
ChatGPT: Set language (will set the language for you)
ChatGPT: Ask a question (will provide you with a prompt to ask a question)
ChatGPT: Please add a test for this code for me (will generate test code based on file/text selection)
ChatGPT: Why is there a bug in this code? (will analyze your code and highlight any logical/syntax errors)
ChatGPT: Please help me explain the code? (will explain the code for you)
ChatGPT: Please refactor this code and tell me what did you change? (will refactor the code for you)
All content can be accessed from the context menu by right-clicking anywhere in the editor.
How to Use
Get API Keys
To obtain an API key from OpenAI, you need to register an account on the OpenAI website first. Once registered, you can log in to your account and find the API Keys section in the settings page at https://beta.openai.com/account/api-keys. You can generate new API keys here or view existing ones.
Ctrl+Shift+P is a common shortcut in Visual Studio Code used to open the command palette. The command palette is a pop-up window that is used to access various commands in Visual Studio Code. If you want to update the APIKey, you can enter the command ChatGPT: Update API Key and enter the new APIKey.