Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Build a big model with ChatGPT seconds, the new plug-in of OpenAI is crazy, and access the code interpreter with one click of get

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > IT Information >

Share

Shulou(Shulou.com)11/24 Report--

After ChatGPT can be connected to the Internet, OpenAI quickly introduced a code generator, with the blessing of this plug-in, ChatGPT can even generate its own machine learning model.

Last Friday, OpenAI just announced that ChatGPT can connect to the Internet and access third-party plug-ins!

In addition to third-party plug-ins, OpenAI also introduces a self-made plug-in "code interpreter" and gives several special use cases: solving quantitative and qualitative mathematical problems; performing data analysis and visualization; and quickly converting file formats.

In addition, Greg Brockman demonstrated that ChatGPT can also handle uploaded video files.

And a best-selling author named Andrew Mayne, a creative app and science communicator for OpenAI, immediately gave it a try-connecting the code interpreter (Code Interpreter) to ChatGPT.

The feeling is, it's too silky!

In the past, when writing code in ChatGPT, you always had to take the code out and test it in another environment.

Now, there is no need to leave the current interface, you can develop directly in ChatGPT.

As long as we add this code interpreter to the data analysis and drawing function, a powerful coding and research tool will be born.

OpenAI new plug-in system: code interpreter currently, the code interpreter can only run Python on a small number of libraries, and even with the most basic libraries, it can do a lot of things, very interesting.

In addition, in addition to generating code, the code interpreter (CI) can analyze the output and use it for another function.

Therefore, we can string different code together, get the output of one of them, and then provide it to the other.

This is how the Pac-Man gif is generated: CI uses the algorithm to generate the maze, turns the maze into a square, uses the algorithm to find the exit, makes it look like Pac-Man, and then generates gif.

Here are some examples of Mayne using ChatGPT's code interpreter plug-in to conduct random experiments.

Create a machine learning model (to some extent) although ChatGPT currently cannot load any machine learning libraries into the code interpreter, we can use n-gram for some basic statistical text generation.

In the following example, by providing it with a book, it is asked to create a prediction algorithm, and then predict the next word in the text sequence.

GPT uses the n-gram model to generate the algorithm:

The next word prediction is a natural language processing task that can be solved using a language model. An easy way to model a language is to use the n-gram model.

N-gram model is a statistics-based language model, which predicts the next word based on the first NMUI word. For example, if we choose nroom3 (that is, the ternary model), the model will predict the next word based on the first two words.

Here is some code that can help you build a ternary model from scratch.

Sound because ChatGPT can understand a lot of mathematical data, and CI can generate downloadable files, so Mayne tried to use ChatGPT to generate Shepard tones. This is a unique tone that can personally create the illusion that the tone is getting higher and higher.

ChatGPT not only successfully completed the task, but also directly used CI to generate a wav file.

Open and listen to this Sheperd sound, the feeling is, two words-perfect!

Since the Sheperd sound generated by ChatGPT is so perfect, Mayne goes a step further, letting ChatGPT generate a session of Conway's life game, which is then converted to music.

Conway Life Game is a computer program designed by Conway at the University of Cambridge. This is a Turing complete zero-player game, which means that its evolution depends on its initial state and does not require further input. )

On the first time, the music generated by ChatGPT was a little too casual, and Mayne asked it to produce more enjoyable music, so ChatGPT applied the pentatonic scale, and it sounded good.

ChatGPT's performance was so excellent that Mayne was so excited that he began to imagine an entire math music album, such as (Fibonacci series, Mandelbrot sets, cellular automata).

He then asked ChatGPT to generate an album cover for the song Conway's Game of Life. Because it is not connected to the DALL-E,Mayne, it is required to generate an image from the analog frame.

The album cover is as follows.

Looking at the album cover, Mayne immediately realized that it might be possible to use ChatGPT to generate a valid QR code.

Mayne asked it to generate a QR code for OpenAI's website, and the result is as follows:

So, can ChatGPT create a Conway Life game that ends with a QR code?

Yes, it can.

In addition, Mayen found that using OpenCV and a simple facial recognition algorithm (Haar Cascade classifier), CI was able to create a function for face recognition.

Face recognition using OpenCV

Now, ChatGPT can open and read files on its own, which means it can theoretically use this data to generate new things. For example, convert a picture to ASCII.

Upload pictures:

Convert to ASCII:

Generate animation through the code interpreter, you can generate data and output it to different formats, including gif.

First, let it make a bouncing block:

Then there was a blizzard:

Then there is the Game of Life, which inspired the QR code simulation.

Try to get the code interpreter to use vectorized cubes to generate "rotated cubes". Before trying other methods, this is the closest result you can get:

According to OCR research, Optical character recognition (OCR) is a library in the code interpreter. Sure enough, it can be identified by testing with screenshots of the website.

Combining OCR with a powerful language model, GPT-4, offers some interesting possibilities for repairing old documents.

As you can see in the image above, OCR can extract part of the text from the whole picture, but the result is still incomplete and noisy.

In view of this, OCR may have limitations when dealing with low-quality or distorted images. If you need to get specific information from the picture, you also need to manually transcribe some of the content.

Calendar invitation

Although the code interpreter does not have access to the ics library, it can generate a plain text calendar invitation and then have ChatGPT save it as an .ics file.

Draw pictures

Although there have been some interesting examples of GPT-4 generating scalable vector images (SVG). But I still wonder what ChatGPT and the code interpreter can do with simple image blocks.

I asked him to draw a cat, and it created something similar to a cat. To make sure it wasn't made from memory, I asked it to draw a blue cap and pipe. Although it is not exactly the high-topped hat I imagined, it is still a hat, blue.

A cat wearing a hat and smoking a pipe:

A cat in a hat and a cat smoking a pipe:

By using the Matplotlib library in the simulator, I successfully asked ChatGPT to generate a simulation of the orbits of the inner planets and saved it as gif.

I then wondered if ChatGPT could simulate a game of checkers and managed to move the pieces, but did not take away the opponent's pieces out of politeness.

Can you simulate a game of chess? First of all, I asked ChatGPT to create his own checkerboard library (a very simple checkerboard library, with some restrictions and illegal movements. And then use Unicode to represent the pieces, after which it can simulate the start of a game and save it as a .gif file.

The following is a conversation between me and ChatGPT during a chess simulation. As you can see, I just gave some instructions, and the ChatGPT and the code interpreter did the rest of the work.

Here are some of Andrew Mayne's explorations of ChatGPT and code interpreter plug-ins.

After netizens read and comment, LLMs is more and more like a real programmer, not only can suggest code snippets, but also can write a whole piece of code, run the code, and give you further guidance and feedback.

Others say that even if you stop your work, you should read this article on the plug-in use case for the GPT-4 code interpreter. This is completely crazy and will change everything.

Reference:

Https://andrewmayneblog.wordpress.com/2023/03/23/chatgpt-code-interpreter-magic/

This article comes from the official account of Wechat: Xin Zhiyuan (ID:AI_era)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

IT Information

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report