I was wondering if I can have a Python sandbox that can leverage the power of Codex. I decided to see if I can get this integrated into Jupyter. After a few days of research and navigating the extension building process, I put together a JupyterLab plugin that can generate code based on the code cells in a Jupyter Notebook. I was able to recreate the hello world experience in the live demo.
I do not have a lot of experience in JupyterLab extension building, so the plugin is still quite rough. Will gladly take any feedback and PRs to refine it over time!
I don’t think so. Colab is a closed environment with no extension system. There might be a way to build a browser extension to hook into the code cells from the browser level
Bit of a newbie when it comes to jupyter extensions here, can you elaborate a bit more on this part:
After installing, you can find the extension settings in Settings -> Advanced Settings Editor and you can add your API keys and adjust the completion settings there.
Seems like you don’t have the extension installed (properly). You might need to restart JupyterLab to see the setting, since there is a server module for posting to the OpenAI API.
Not the same issue, the server gives me 404. It must be some security thing on the GCP server. You must be running jupyter locally. I run it on HPCs on the cloud for production.
The installation of the plugin is fine.
Maybe you can try to look into the source code and see what went wrong. Because the way the plug-in is built is relying on the jupyter server to expose an endpoint for the codex request. The Python code needs to be registered. Usually a restart resolves the issue.
This is a jupterlab base setting I believe. You might want to look into your settings on the jupyterLab. This part of the code is generated by their extension template.
Yeah… I didn’t have a lot of experience with Python (last time I intensively used Python was v2.5 about 10 years ago) until very recently, and definitely not a lot of experience with JupyterLab extension building, and when I looked at the docs on JupyterLab, there wasn’t a lot of useful information to help me build the extension. I had to look at other extensions and improvise. I had Codex help me write some parts of the extension though (in the form of GitHub Copilot), and it was able to know some APIs about the extension building and spit out useful parts for me!