3 ms·
This is something that I've also been wanting to play with. The token limit is too small for my codebase so I haven't really bothered, but it would be nice to
by jrockway 3y ago
This is something that I've also been wanting to play with. The token limit is too small for my codebase so I haven't really bothered, but it would be nice to tell it all my code and then say "refactor everything of the form `err = foo` into `if err := foo; ...`". If AI is going to take my job, it is going to have to learn to do maintenance!
- anotherpaulg 3y agoGive aider a try. As long as each file fits in the context window, it should work. With gpt-3.5-turbo-16k or gpt-4 you can edit files up to around 30 kbytes in size. If you have access to gpt-4-32k, you could edit files up to about 120 kbytes. See the notes here for more info: https://github.com/paul-gauthier/aider#gpt-4-vs-gpt-35 https://github.com/paul-gauthier/aider#gpt-4-vs-gpt-35 I use GPT for all kinds of busy work, and code quality type work. Adding test cases or quality of life features. Things that I might not have the energy to do myself. GPT can often accomplish these tasks off a 1-2 sentence request. Or if not, it will do all the boilerplate and get you 80% of the way there and it's easy to polish up the final 20%.
- NicoJuicy 3y agoPerhaps it helps: Don't entirely copy-paste your code base. Eg. I adjusted the prompt to the logical separation in my project ( Eg. the module and the task of the class can be derived from it's namespace) and then indexed the codebase through the namespace + classes + method names with their parameters. It helps adding more codebase to the prompt.