The minimalistic 'Explain Code' extension for Visual Studio Code allows developers to easily understand and explain complex code. Using the OpenAI GPT-3 language model, the extension generates natural language explanations for code snippets and entire files that can be accessed without having to leave the IDE.
Made with ☕ by Eimen
- Generates natural language explanations for code snippets and entire files.
- Utilizes the OpenAI GPT-4o language model for accurate and human-like explanations.
- Easy to use:
- Explain code snippets: highlight code, right click, click "Explain selected code"
- Explain whole file: Click on the "Explain Code" button in the bottom right of your IDE
A valid OpenAI API key, which can be obtained from the OpenAI website
The Explain Code extension contributes the following setting:
- openaiKey: Your OpenAI API key, which is used to access the GPT-3 language model.
- If the OpenAI API key is not set, the extension will not work.
- The function to explain whole files only works for small files, as the OpenAI API has a limit of 4000 tokens (approx. 3000 words) per request.
- Added support for GPT-4o model
- Use axios instead of request
If you are interested in contributing to the development of this extension, please check out the GitHub repository
This extension is licensed under the MIT License.
Enjoy!