Expanding ChatGPT Code Interpreter with Python Packages, Deno And Lua
Expanding ChatGPT Code Interpreter with Python Packages, Deno And Lua

The ChatGPT Code Interpreter alpha stays incredibly interesting. I wrote about how I was utilizing it for Python and SQLite benchmarking a few weeks ago. Today I found a neat pattern for expanding its capabilities with customized binaries. If you do not but have access to the alpha, the important thing thing to know is that it offers ChatGPT with entry to a Python interpreter. It does not have network access - it can't make outbound HTTP requests, or download packages - but it might probably do all types of attention-grabbing issues by running code. One of the neatest options of Code Interpreter mode is that you can add recordsdata to it. This opens up a world of potentialities. For example, you'll be able to upload CSV information, or Excel files, or even SQLite databases and have it use Python and numerous baked-in libraries to course of them - including rendering charts towards information from them utilizing matplotlib. Today I found out you possibly can add Python wheels, too!


If there's a package deal that you want to make use of you'll be able to seize the .whl recordsdata for it from PyPI, upload them to ChatGPT and it'll set up them into its own environment throughout that chat session. If a library has dependencies you have to add those, too. It didn't need tabulate, click on or python-dateutil since those have been already included in the setting. One of many neat issues about the Deno server-facet JavaScript runtime is that it is packaged as a single binary. Could importing that binary be sufficient to grant ChatGPT the power to run JavaScript? To my surprise, the answer is yes! And uploaded it to ChatGPT. Now that I knew I may upload and run binaries, what other programming languages could I play with? I asked ChatGPT for ideas of programming languages that came bundled as a single binary, and certainly one of its ideas was Lua. So now I need a single binary file version of Lua, compiled for the same architecture because the ChatGPT server. I have a M2 MacBook Pro. This uses Docker Desktop on my Mac to start out a bash session inside a new Ubuntu 20.04 container, emulating amd64 structure. It also mounts the present listing to /mnt within the container. The primary command installs Lua. The second copies that lua binary to the /mnt listing, making it available on my Mac. I now have a Lua binary that can work in ChatGPT! Honestly, Code Interpreter is by far essentially the most thrilling characteristic I've performed with in ChatGPT. I truly suppose it is extra attention-grabbing than both ChatGPT Plugins and ChatGPT Browsing - the opportunities it opens up are fairly astonishing. Ethan Mollick has been doing some actually attention-grabbing explorations with it. This Twitter search ought to hopefully return some of his current experiments.


Leave a Reply

Your email address will not be published. Required fields are marked *