The most interesting mode of AI: ChatGPT with Code Interpreter*
The most powerful AI on the planet has just leveled up. With the ability to solve problems and analyze data, it’s poised to disrupt the field of data science and change the way we do business.
Let me start with something that happened this March that you might have missed, but it’s very important. A new kind of AI was born, one that can do more than just answer questions or generate text and images. It’s called #AutoGPT, and it’s an “AI agent” that can achieve goals that you give it in natural language. How does it do that? By breaking the goal into sub-tasks and using other AI agents in an automatic loop. In other words, we move with AI from prompts to goals! AutoGPT technology is still in its infancy, but it shows the way of where things are going with AI. It’s a glimpse of the future, where AI can perform autonomous tasks and learn from its own experiences.
ChatGPT with the Code Interpreter plugin, which recently became publicly available, is a first small implementation of a mass AutoGPT.
you and me? It means that #ChatGPT can do more than just chat with us. It can also write and run code within the chat interface, thanks to
the #CodeInterpreter plugin. (we talked about the importance of the plugins, in our previous article). This plugin allows ChatGPT to translate your problem into code and execute it to solve it 😲. This is not only useful for learning new programming languages, debugging code, testing algorithms, and more, but also a sign of something bigger. It shows that ChatGPT can use its natural language understanding and generation abilities to manipulate the world and perform autonomous tasks.
Before we start with some examples of how it works, let me tell you the steps to use Code Interpreter:
- You need to be a ChatGPT Plus subscriber, which costs $20/month.
- Activate Code Interpreter in beta features from your ChatGPT account settings.
- Select Code Interpreter as a plugin in your chat window:
Now let’s see some examples.
Example 1: ChatGPT is a powerful language model, but it has one major weakness: it’s not good at math. This is because math requires a different kind of reasoning than language. Math is about logic and problem-solving, while language is about communication and understanding.
However, with the help of the Code Interpreter plugin, ChatGPT can address its “by design” weakness and write Python code to solve mathematical problems.
Example 2: ChatGPT can now graph public data without any input from you. This means that you can ask it to graph data from public sources, and it will do all the work for you. ChatGPT will fetch the data, load it into its software, and format the chart. This is a major improvement over the previous process, which required you to find the data, load it into excel, and then format the chart.
Example 3: Video editing is actually maths, so Code Interpreter can create videos or animated gifs from prompts:
This image is a panoramic shot. Help me turn it into an animated GIF with aspect ratio 3:2, with the image filling the entire video (so the sides are cut off). The video should be centered in the middle of the image. Then, pan the video smoothly (with no sudden jumps) as follows:
Start: Center –> Right –> Center –> Left –> Center: End
Use the imageio library to help you. Save the frames directly to a video file instead of into a list. Use a frame step of 8 pixels. If necessary, crop the edges of the image so that the size of the image is divisible by the frame step.
While this is the animated GIF that it created from a static panoramic picture:
Let’s see step by step how it works: