Jupyter AI
jupyter-ai.readthedocs.io
jupyter-ai.readthedocs.io
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.
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.
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.
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?
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.
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.
This is a nice feature! Not huge, but it's great DevEx (MLEngEx...?)
Incorrect API key provided error on jupyter for chatgpt. I'm on a paid account so not sure why...
Kinda strange statement. I think of Jupyter as one of the places generative AI originated!
For louie.ai, we've been going for data-aware from the get-go, and more broadly, doing a LLM-first tool design rethink. In the large, as I look around, it feels super early for the dev community figuring out core genAI notebook tool uses, flows, & assumptions. Likewise, zooming-in on individual feature experiments, current tools feel rough & underpowered relative to what we already know is possible.
We've been forced to question a lot as we've been learning from going operational and experimenting with design. Again, if up for it, would love to chat & exchange notes!
A couple of other benefits: - the AI will have an easier time automatically fixing runtime errors - it knows how to fix and transform user input into the correct data format, e.g., "san fancisco" => "San Francisco"
Edit: it’s running via a llama.cpp server
Wondering if others are finding use for genAI in notebooks.
It's particularly useful when I can just write a comment explaining the kind of transformation I want, and it then writes a pandas incantation which I can immediately check and iterate on.
I wrote the package to solve my own issue, I need a really lightweight interface to GPT and primarily from ipython.
While I don’t find this to be a life changing new thing, it is useful and the ChatGPT output is formatted beautifully. I use an iPad a lot when I am reading and doing quick code experiments about what I am reading so Colab with the CodePilot like functionality, and things like ChatGPT support really make Colab more than OK for quick code experiments, especially when I need an A100 GPU.
"Installation via pip within Conda environment (recommended)"
This is one of the signs of Python's package management being too messy. I learnt NOT to use pip to install packages inside of conda environments after considerable pain. Now this guide says that's recommended?