Code Monkey home page Code Monkey logo

gpt-code-reviewer's Introduction

gpt-code-reviewer

gpt-code-reviewer is a Python script that assists you with code reviews using OpenAI's GPT-3.5 language model. It interacts with users through a command line interface and GitHub API to retrieve code for review.

Requirements

The script requires access to a GitHub account and an OpenAI API key.

Set environment variables:

GITHUB_TOKEN - optional for authentication

OPENAI_API_KEY - required to access gpt

Usage

Clone the repository and navigate to its directory in your terminal. Then, run the following command:

cp config.yaml.example config.yaml

Edit config.yaml to suit your needs.

Run this command to start the application and chat with GPT about your pull requests.

python chat.py

The script will prompt you to select a repository and pull request to review. You will then be prompted to enter 'r' to review the code, 'q' to quit, 'h' for help, and 'n' to review a different pull request.

The language model will provide suggestions and feedback based on your input, and you can continue to review the code until you are finished.

Transcripts of the conversation will be saved as a markdown file for reference.

API

You can also host gpt-code-reviewer as an api using python api.py, see api.py for the list of routes.

SudoLang

You can run a SudoLang version of this at https://github.com/rjmacarthy/pseudo

License

This script is licensed under the MIT License. See the LICENSE file for details.

gpt-code-reviewer's People

Contributors

glenclayton avatar rjmacarthy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.