mpoon / gpt-repository-loader Goto Github PK
View Code? Open in Web Editor NEWConvert code repos into an LLM prompt-friendly format. Mostly built by GPT-4.
License: MIT License
Convert code repos into an LLM prompt-friendly format. Mostly built by GPT-4.
License: MIT License
Most repos don't have .gptignore
, ignore .gitignore
if .gptignore
is not present.
We want to add a new end to end test for gpt-repository-loader. The test should use gpt-repository-loader to process an example repository and ensure that the output is what we expect.
I have an internal library for counting tokens on files and directories, should probably opensource it.
Given an ignore file of
/this_directory
Git will ignore the directory, this tool will include it. It'd be rad if they were consistent.
Add a .gitignore file to our project.
to ease for hosted repos.
Add a permissive open source license to this project.
File "gpt_repository_loader.py", line 30
output_file.write(f"{relative_file_path}\n")
^
SyntaxError: invalid syntax
I followed the instruction but getting the above error when trying to run the command on my repository.
Rename git_to_text.py to gpt_repository_loader.py
Currently .tox is included into the output.txt. This is a lot of files.
We want gpt-repository-loader to accept a new command line argument that allows the user to override the default preamble text generated in output.txt before any filenames or file content is output.
I see you said that you manually created PR #17 from the output of ChatGPT.
What if we could automate PR creation? The only manual step would be to create a GitHub account for ChatGPT. After creating that, I guess we would need a script that:
git am
locally.I compared, zipping a medium size repo to representing it with one big file, as per this tool. I got repeated response generation errors. When I ask GPT-4 the meta questions about which was better, each method had some pros and cons, but it was definitely leaning towards zip.
Manually copypasting from output.txt is still work, auto copy the content to clipboard for easy pasting into ChatGPT.
gpt-repository-loader
command.Update the README file with:
Add a test harness to gpt-repository-loader
GPT-4, can you help me with these items:
Add the following files to .gptignore
Thank you for the wonderful tool!
When inputting to GPT-4 at once, I get the error "The message you submitted was too long, please reload the conversation and submit something shorter."
In my fairly simple React app, when I output output.text, the number of lines reached 6 million, and of course, most of it was node_modules. When I excluded descriptions unrelated to the app, such as node_modules, yarn.lock, and .git/, it reduced to about 1,500 lines, but I still got the same error.
Now, I've declared to send one file at a time, and by repeatedly copying and pasting, it seems that the files can be read.
I will now type in the code for an application, file by file. The following text is a Git repository with code. The structure of the text are sections that begin with ----, followed by a single line containing the file path and file name, followed by a variable amount of lines containing the file contents. The text representing the Git repository ends when the symbols --END-- are encounted. Any further text beyond --END-- are meant to be interpreted as instructions using the aforementioned Git repository as context.
It might be useful to have features like the following:
With GPT-4, I could send about 400 lines at a time (4-5 files).
Also, every time I sent it, the contents of the file were properly explained, and when I sent it up to --END--, it even created a summary for me, which was impressive.
From now on, I would like to verify whether GPT can handle code maintenance and adding new features.
Will you sell your GPT-4-32k API? If you would like to, please contact me.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.