ChatGPT PLUS
Make ChatGPT your partner to improve your programming experience.
With just one click, you can create files/projects, fix your code, or utilize OpenAI's official GPT3 APIs--all without any configuration! Simply put your API key in the settings, and begin! Exporting all your conversation history at once in Markdown format is also easily done.
Features
The extension includes a context menu commands that enables you to send the chosen text or code to the chatGPT service and display the output in the chatGPT panel. This panel allows you to copy or move the code to the current file or create a new file and then move the result there.
API Key
You need to create an API key and enter it into your Visual Studio Code settings to use this extension:
{
"chatgptplus.apiKey": "YOUR API KEY"
}
Available Commands
- ChatGPT: Ask Anything
- ChatGPT: Refactor Code
- ChatGPT: Generate Comment
- ChatGPT: Generate Code
- ChatGPT: Generate Tests
- ChatGPT: Find Bugs
- ChatGPT: Optimize Code
- ChatGPT: Explain Code
- ChatGPT: Clear Conversation
- ChatGPT: Export Conversation
- ChatGPT: Rewrite Selection
- ChatGPT: Send Selection
- ChatGPT: Summarize Selection
Refactor Code
Generate Code
Generate Tests
Find Bugs
Optimize Code
Explain Code
Rewrite Selection
Summarize Selection
Customize your code prompts or use defaults
"chatgptplus.promptPrefix.addTest": {
"default": {
"default": "Generate tests:"
},
"description": "The prompt prefix used for adding tests for the selected code",
"type": "object"
},
"chatgptplus.promptPrefix.summarize": {
"description": "The prompt prefix used for summarizing text.",
"default": "Summarize text: ",
"type": "string"
},
"chatgptplus.promptPrefix.comment": {
"default": {
"default": "Generate short comment: "
},
"description": "The prompt prefix used to generate comment for selected code.",
"type": "object"
},
"chatgptplus.promptPrefix.explain": {
"default": {
"default": "Explain code: "
},
"description": "The prompt prefix used for explaining the selected code",
"type": "object"
},
"chatgptplus.promptPrefix.findProblem": {
"default": {
"default": "Find problems: "
},
"description": "The prompt prefix used for finding problems for the selected code",
"type": "object"
},
"chatgptplus.promptPrefix.generate": {
"default": {
"default": "Generate code: "
},
"description": "The prompt prefix used generate code base on text",
"type": "object"
},
"chatgptplus.promptPrefix.optimize": {
"default": {
"default": "Optimize code: "
},
"description": "The prompt prefix used for optimizing the selected code",
"type": "object"
},
"chatgptplus.promptPrefix.refactor": {
"default": {
"default": "Refactor code and explain what's changed: "
},
"description": "The prompt prefix used for refactoring the selected code",
"type": "object"
},
"chatgptplus.promptPrefix.rewrite": {
"default": "Rewrite following sentence: ",
"description": "Will try to rewrite sentences.",
"type": "string"
}
If you wish to set prompts based on file type, simply include the file name and the prompt value you desire:
"chatgptplus.promptPrefix.addTest": {
"typescript": "Generate tests typescript:"
}
Set Prompts Base on File type
Extension Options
"chatgptplus.apiKey": {
"description": "Openai api key to communicate with chatgpt api",
},
"chatgptplus.maxTokens": {
"default": 1000,
"description": "The maximum number of [tokens](https://github.com/ccpu/vscode-chatgpt-plus/blob/HEAD/tokenizer) to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. Most models have a context length of 2048 tokens (except for the newest models, which support 4096).",
},
"chatgptplus.model": {
"default": "text-davinci-003",
"description": "ID of the model to use. You can use the [List models](https://github.com/ccpu/vscode-chatgpt-plus/blob/HEAD/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://github.com/ccpu/vscode-chatgpt-plus/blob/HEAD/docs/models/overview) for descriptions of them.",
}
Caveats & Limitations
Although the conversation panel appears to be having a conversation with ChatGPT, it is not. This extension uses the official OpenAPI library to communicate with the ChatGPT API and this library does not yet provide a conversation API. This means that it will only provide an answer to the current question asked and will not be aware of any preceding conversations.
Disclaimer
Using this extension comes with no guarantee that it will continue to function as intended, without any issues or side-effects. Please proceed with caution, as it may be subject to changes that are out of our control. For example, OpenAI may make unannounced alterations to some or all of its features, which could have an impact on this extension's performance.
This extension never uses or stores your personally identifiable information.
This extension will use an API Key stored in the settings.json file. Please note that VS Code may sync this key across its instances and this is outside of this extension's boundary. If you are not comfortable with this, then you should not use the extension.
The extension will only collect metadata in order to improve its features, with no personally identifiable information being collected. You can choose whether or not to enable telemetry by setting either 'telemetry.telemetryLevel' or 'chatgptplus.telemetry.disable' to their respective values; the extension will then only collect metadata if both of these settings have allowed telemetry.
We cannot be held liable for any issues that may arise while using this extension. Please note that your use of OpenAI services is subject to OpenAI's Privacy Policy and Terms of Use.
Credits