Using ChatGPT’s Code Interpreter to Work With the Latest Tech Libraries

John Polacek
2 min readAug 20, 2023

--

Ever tried asking ChatGPT about some shiny new library that just dropped? If you did, you might’ve hit a tiny snag. You see, our AI buddy here, as brilliant as it is, last hit the books in September 2021. Yup, that’s right! Anything fresher than that, and ChatGPT’s kinda in the dark. It’s like asking your grandpa about the latest TikTok trends.

So, how’s a dev supposed to team up with ChatGPT while also staying up to date with the latest and greatest open source libraries out there?

The good news is that there’s a straightforward way to bridge this gap: ChatGPT’s Code Interpreter!

By harnessing the power of the Code Interpreter and its file upload feature, you can give ChatGPT a crash course on any new library you’re trying to explore.

Enable Code Interpreter

As of this writing, Code Interpreter is a beta feature that you need to enable via the Beta tab in your settings. Additionally it is only available to ChatGPT Plus users.

Enable the Code Interpreter Beta Feature in your OpenAI Settings

Upload Documentation

Go to the documentation of that new library you’re curious about. Copy and paste it into a text file, trimming anything extraneous then use the Code Interpreter feature to upload this file to ChatGPT. You can add a prompt to tell ChatGPT what you want it to do with this file.

An example of how you can upload a text file to Code Interpreter

After you’ve uploaded the file, you can follow along as Code Interpreter performs various actions to analyze the content.

Example of how Code Interpreter will try to analyze a text file

Ask Away

Once uploaded, you can start asking ChatGPT about the library’s features, functions, and quirks. It will analyze the content and respond with insights, as if it’s been aware of this library all along.

Example of how Code Interpreter analyzed Zod’s documentation for changes since 2021

Code Interpreter’s file upload feature is useful beyond just training on documentation for new libraries. Think of it as a portal to feed ChatGPT bite-sized knowledge boosts on any topic — research papers, industry reports, market analyses… you name it.

Follow me on Twitter for more posts on AI, web dev and more.

--

--

John Polacek
John Polacek

Written by John Polacek

Engineering Manager at Howl. I love brass tacks and the nitty gritty. Ideas are great. Executing is better.

No responses yet