3 ms·
This looks useful, but not quite what I hoped. GPT4 with Code Interpreter is a fun, frustrating experience where you’re writing a dialog about writing some cod
by skybrian 3y ago
This looks useful, but not quite what I hoped.
GPT4 with Code Interpreter is a fun, frustrating experience where you’re writing a dialog about writing some code, sort of like pair programming or a code interview. Compared to a notebook, it’s terrible. The sandbox environment resets if you take a break. There’s also a quota, and if you hit that it forces taking a break, causing a reset.
In a notebook, you could rerun all the cells and pick up where you left off. When using Code Interpreter, GPT4 will see a stack trace indicating that a symbol is undefined, interpret that as a reset, and write the code again. It’s sort of cool the first time it happens but it’s unnecessary and becomes tedious.
The resulting experience is a cross between a roguelike and a text adventure, where I try to get something fun accomplished in one sitting, before running out quota. (This is strictly recreational programming.)
It’s beta. I assume they know it has problems and will eventually fix it.
I’d like to see a recreation of this “writing a dialog together about coding” experience using a notebook-like interface that isn’t terrible. The point isn’t just to write the code (it’s doing it the hard way), it’s writing a tutorial about how to solve a problem.
Jupyter AI looks like a somewhat more practical tool. It’s designed to not use the AI API too much to keep expenses down, and doesn’t have the impractical limitation that you cannot write the code yourself. It’s not the same game, though.
- anotherpaulg 3y agoYou might find it interesting to try my open source ai coding tool “aider”. It lets you pair program with gpt-4 like you are describing. But the source code lives in your local git repo. You can start a new project or work with an existing repo. You can fluidly switch back and forth between a coding chat where you ask gpt to edit the code and your own editor to make edits yourself. https://github.com/paul-gauthier/aider https://github.com/paul-gauthier/aider
- antman 3y agoSeems very good! In the edit a whole repo example how do you account for many files i.e. many tokens? Can it also have a vector search?
- anotherpaulg 3y agoAider scans the repo for all the important identifiers/symbols and condenses them down to make a "repo map" [0]. You tell aider which files you want it to edit, and it uses the repo map to augment them with all the relevant code context from the rest of the repo. This way when GPT makes code changes, it is able to respect and utilize the existing modules and abstractions present in the codebase. [0] https://aider.chat/docs/ctags.html https://aider.chat/docs/ctags.html
- skybrian 3y agoThis looks like it might be quite nice for practical use. Does it work for a Jupyter notebook, including plotting things and making images? I see someone make it work in Colab, though it looks like a bit of a hack and how they are handling credentials looks iffy. Ultimately, I'd like the final result to be a tutorial-style blog post, so git isn't strictly required for my purposes. The conversation is as important as the code.
- skybrian 3y agoThis looks like it might be quite nice for practical use. Does it work for a Jupyter notebook, including plotting things and making images? I see someone make it work in Colab, though it looks like a bit of a hack and how they are handling credentials looks iffy. Ultimately, I'd like the final result to be a tutorial-style blog post, so git isn't strictly required for my purposes. The conversation is as important as the code.
- anotherpaulg 3y agoRight now aider isn't integrated with jupyter notebooks, but it is certainly on the roadmap. I have been sharing aider conversations [0] to help folks understand what it's like to pair program with GPT-4. I've had some users asking how they can share aider chat transcripts like this, so I'm hoping to add that capability soon. I don't think it's a full solution to your needs, but it might be helpful? [0] https://aider.chat/examples/2048-game.html https://aider.chat/examples/2048-game.html
- skybrian 3y agoYes, more or less. I'd want to paste the output into an editor and then edit it into somewhat more polished prose. For many blogging tools, perhaps Markdown would be best? I also wouldn't want the whole thing to look like a terminal window or to contain diffs, since the idea wouldn't be to represent aider or GPT4's output faithfully. Instead, the dialog would be about two characters who make additions to some code, like you do in a repl or notebook. Being able to download the notebook would be nice too. This seems rather different (and more specialized) than the git-based approach that aider uses, so it's probably a different tool that I should get to writing someday.
- anotherpaulg 3y agoIf you are happy with markdown, aider already logs the conversations that way. You can find them in `.aider.chat.history.md`.
- stavros 3y agoThis is great, thank you! I can see myself using this whenever I program, though I can feel my skills atrophy whenever I have GPT write code.