Skip to content

ChatGPT-Code-Review is a Rust application that uses the OpenAI GPT-3.5 language model to review code. It accepts a local path to a folder containing code, and generates a review for each file in the folder and its subdirectories.

License

gorgarp/ChatGPT-Code-Review

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChatGPT-Code-Review

ChatGPT-Code-Review is a Rust application that uses the OpenAI GPT-3.5 language model to review code. It accepts a local path to a folder containing code, and generates a review for each file in the folder and its subdirectories.

The program prompts the user for an OpenAI API key, which is required to use the GPT-3.5 model. Once the API key is provided, the program generates code reviews using GPT-3.5 and prints the results to the console. Additionally, the program saves the reviews to a file named "review.txt" in the current directory.

Getting Started

To use ChatGPT-Code-Review, you will need to obtain an OpenAI API key. You can sign up for an API key on the OpenAI website.

Once you have an API key, you can either compile the program in Rust or download the latest release.

To compile the program in Rust, run the following command:

cargo build --release This will generate an executable in the target/release directory.

To run the program, navigate to the directory containing the executable and run the following command:

./chatgpt-code-review The program will prompt you for your OpenAI API key and the path to the folder containing the code you want to review. Once you provide this information, the program will generate a review for each file in the folder and its subdirectories.

Output

The output of the program is printed to the console and saved to a file named "review.txt" in the current directory. Each review consists of the file path and the review text generated by GPT-3.5.

Here's an example of what the output might look like:

File: /path/to/file1.py
Review:
This code is well-organized and easy to read. The variable names are clear and descriptive, and the function names are consistent with Python naming conventions. Overall, this is a well-written and maintainable code.

File: /path/to/file2.js
Review:
The code contains some syntax errors and undefined variables. Additionally, the use of nested callbacks makes the code difficult to follow. I would recommend refactoring this code to use Promises or async/await to improve readability and maintainability.

Contributing

We welcome contributions to ChatGPT-Code-Review! If you have any feedback, suggestions or bug reports, please feel free to open an issue or submit a pull request.

About

ChatGPT-Code-Review is a Rust application that uses the OpenAI GPT-3.5 language model to review code. It accepts a local path to a folder containing code, and generates a review for each file in the folder and its subdirectories.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages