GPTutor is a Visual Studio Code extension that uses OpenAI's GPT (Generative Pre-trained Transformer) models to provide users with code explanations and audits for a better understanding of their code. It supports Solidity language, enabling users to get insights into code blocks and improve their coding skills.
Features
Get code tutor and audits using OpenAI's GPT models.
Supports Solidity language for now.
Hover over code blocks to display GPTutor suggestions.
Set OpenAI API key for GPTutor (100% Free and we don't own your key).
Set the GPT model to be used (supported GPT-3.5, GPT-4).
Getting Started
Install the GPTutor extension in your Visual Studio Code editor.
Activate the extension by running the "GPTutor: init" command.
Set your OpenAI API key by running the "GPTutor: setKey" command.
(Optional) Set the GPT model to be used by running the "GPTutor: setModel" command.
Hover over a code block to display GPTutor suggestions.
Choose the tutor or audit help.
Usage
GPTutor provides two main functionalities: code tutor and code audit.
Code Tutor
Hover over a code block in a supported language (Solidity).
A hover tooltip will appear showing the code block and two options: GPTutor and Audit.
Click on the "GPTutor" option to get detailed explanation of the selected code.
Code Audit
Hover over a code block in a supported language (Solidity).
A hover tooltip will appear showing the code block and two options: GPTutor and Audit.
Click on the "Audit" option to get an audit of the selected code.
Extension Settings
This extension contributes the following settings:
gptutor.openaiApiKey: Set your OpenAI API key.
gptutor.model: Set the GPT model to be used.
Requirements
Visual Studio Code
OpenAI API key
License
This project is licensed under the MIT License. See the License.txt file for more information.