mpoon/gpt-repository-loader
关于
将代码仓库转换为适合用作 LLM 提示词的格式。主要由 GPT-4 构建。
人工智能与机器学习实测星标增长
- 24小时
- -1
- 7天
- -1
- 15天
- -2
- 1个月
- -3
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文gpt-repository-loader
gpt-repository-loader is a command-line tool that converts the contents of a Git repository into a text format, preserving the structure of the files and file contents. The generated output can be interpreted by AI language models, allowing them to process the repository's contents for various tasks, such as code review or documentation generation.
Contributing
Some context around building this is located here. Appreciate any issues and pull requests in the spirit of having mostly GPT build out this tool. Using ChatGPT Plus is recommended for quick access to GPT-4.
Getting Started
To get started with gpt-repository-loader, follow these steps:
Ensure you have Python 3 installed on your system.
Clone or download the
gpt-repository-loaderrepository.Navigate to the repository's root directory in your terminal.
Run
gpt-repository-loaderwith the following command:python gpt_repository_loader.py /path/to/git/repository [-p /path/to/preamble.txt] [-o /path/to/output_file.txt]Replace
/path/to/git/repositorywith the path to the Git repository you want to process. Optionally, you can specify a preamble file with -p or an output file with -o. If not specified, the default output file will be named output.txt in the current directory.The tool will generate an output.txt file containing the text representation of the repository. You can now use this file as input for AI language models or other text-based processing tasks.
Running Tests
To run the tests for gpt-repository-loader, follow these steps:
Ensure you have Python 3 installed on your system.
Navigate to the repository's root directory in your terminal.
Run the tests with the following command:
python -m unittest test_gpt_repository_loader.py
Now, the test harness is added to the gpt-repository-loader project. You can run the tests by executing the command python -m unittest test_gpt_repository_loader.py in your terminal.
License
This project is licensed under the MIT License - see the LICENSE file for details.
探索相关项目
加载中…