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
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
GPTutor is an open-source, free tool. Donations are welcome:
Sui: gptutor.sui
Ethereum: 0xCD1Ef67405DC7B2516298dcfc9De8A325d29635C
BTC: 1AoMLkWvi3MGvCpeqq5YYRERKX3cZQx8U1
- 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)
2. Activate the GPTutor by clicking π€ at the left side panel. You might find GPTutor in the "Additional Views" button.
3. Set OpenAI API key by pasting the key in the input box. You may follow the instruction to get an API key from OpenAI's Webiste
> GPTutor: setModel
7. Click on the "Settings" button located at the top left corner to access additional configuration options. From there, you can customize settings such as Prompt, Model, or Output Language.
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.
- 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.
- 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
andRewrite
- Execute by
Ask GPTutor
.
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.
- Visual Studio Code
- OpenAI API key
This project is licensed under the MIT License. See the License.txt file for more information.
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}
}