GPTutor(🤖,🤖) - VS Code Extension
GPTutor(🤖,🤖) is a Visual Studio Code extension that uses OpenAI's GPT (Generative Pre-trained Transformer) models to provide users with code explanations and Reviews for a better understanding of their code and enabling users to get insights into code blocks and improve their coding skills. (Supported Move programming languages now)
https://marketplace.visualstudio.com/items?itemName=gptutor.gptutor
GPTutor x Move Workshop:
Come and participate in the workshop on June 28th, from 11:00 AM to 12:30 PM GMT+9, featuring Sam Blackshear, the creator of Move, and Eason Chen, the creator of GPTutor. Join us to delve into the world of GPTutor and Move development.
Register at https://lu.ma/gptutor
Donation
GPTutor is an open-source, free tool. Donations are welcome:
Sui: gptutor.sui
Ethereum: 0xCD1Ef67405DC7B2516298dcfc9De8A325d29635C
BTC: 1AoMLkWvi3MGvCpeqq5YYRERKX3cZQx8U1
Features
- Code tutor using OpenAI's GPT models.
- Code Review (review) using OpenAI's GPT models.
- Code comment using OpenAI's GPT models.
- Supports Move language for now.
- Non-custodial API key (100% Free and we don't own your key).
- Supported GPT-4 model (default GPT-3.5)
Getting Started
1. Install the GPTutor(🤖,🤖) in your Visual Studio Code editor from Extensions
4. (Optional) Set the GPT model to be used by running the GPTutor: setModel
Command
> GPTutor: setModel
5. Hover over a code block to display GPTutor suggestions
Usage
GPTutor provides three main features: Explain
, Comment
, and Review
whhen you hover on the code you selected. Moreover, you can interact with GPTutor directly on the input box.
Code Explain
- Hover over a code block in a supported language.
- Click on the
Explain
option to get a thoughtful explanation of the selected code.
- Hover over a code block in a supported language.
- Click on the
Comment
option to get a commented and refactored version of the selected code.
Code Review
- Hover over a code block in a supported language.
- Click on the
Review
option to get an Review of the selected code.
- Input the instruction
- Selected the mode, such as
Code Generate
and Rewrite
- Execute by
Ask GPTutor
.
Customize Prompt
Follow the instructions in this document to customize the prompt. The default prompts is in set the package.json, you are welcome to send pull requests for your awesome prompts.
Requirements
- Visual Studio Code
- OpenAI API key
License
This project is licensed under the MIT License. See the License.txt file for more information.
Paper Reference
Paper 1 introduce GPTutor: https://arxiv.org/abs/2305.01863
@article{chen2023gptutor,
title={GPTutor: a ChatGPT-powered programming tool for code explanation},
author={Chen, Eason and Huang, Ray and Chen, Han-Shin and Tseng, Yuen-Hsien and Li, Liang-Yi},
journal={arXiv preprint arXiv:2305.01863},
year={2023}
}
Paper 2 that focus on customizable prompts: https://arxiv.org/abs/2310.13896
@article{chen2023gptutor,
title={GPTutor: an open-source AI pair programming tool alternative to Copilot},
author={Chen, Eason and Huang, Ray and Liang, Justa and Chen, Damien and Hung, Pierce},
journal={arXiv preprint arXiv:2310.13896},
year={2023}
}