Home  >  Article  >  Technology peripherals  >  ChatGPT can run its own code: when you submit a request, you can directly input the running results. Netizens called it "magic" after the internal test.

ChatGPT can run its own code: when you submit a request, you can directly input the running results. Netizens called it "magic" after the internal test.

王林
王林forward
2023-04-04 11:45:011204browse

Once something written by ChatGPT has a bug, you must immediately restart a new session, otherwise its errors will begin to multiply: this feels like it is trying to hide something, which is very strange.

If you give ChatGPT a request, it can only give you a bunch of code with unknown operating effects?

Now, with just a small change, ChatGPT can not only directly turn your text requirements into code, but can also run it for you and return the output results to you!

The secret is the code interpreter plug-in.

ChatGPT can run its own code: when you submit a request, you can directly input the running results. Netizens called it magic after the internal test.

Writer Andrew Mayne (now joining OpenAI) obtained the qualification for internal testing and tried it. The effect made him call it "magic"——

ChatGPT can run its own code: when you submit a request, you can directly input the running results. Netizens called it magic after the internal test.

Let ChatGPT write an AI face detection program. After Andrew Mayne uploaded his own photo, it was quickly detected:

ChatGPT can run its own code: when you submit a request, you can directly input the running results. Netizens called it magic after the internal test.

Try again and let it write a maze generation algorithm and make the path into a Pac-Man animation. It’s no problem at all:

ChatGPT can run its own code: when you submit a request, you can directly input the running results. Netizens called it magic after the internal test.

Some netizens saw this internal beta Sigh after the article:

This is so crazy, it will change everything.

ChatGPT can run its own code: when you submit a request, you can directly input the running results. Netizens called it magic after the internal test.

Let’s take a look at what magical “magic” Andrew Mayne discovered in the closed beta.

What magical "magic" was discovered?

As one of the most popular ChatGPT plug-ins, the code interpreter is a Python interpreter that works in a sandbox and firewall execution environment and contains some temporary disk space.

To put it simply, you only need to enter a sentence into ChatGPT. It can not only write the code, but also use the interpreter to run through the code, give an explanation of each line of code, and output the result to you:

ChatGPT can run its own code: when you submit a request, you can directly input the running results. Netizens called it magic after the internal test.

The generated content is also diverse, from text, image and sound processing to chess game engines and simple AI algorithms, ChatGPT can handle it.

Text image sound processing

Let’s first look at the generation and processing effects of images.

For example, use ChatGPT to convert a Cthulhu image to ASCII:

ChatGPT can run its own code: when you submit a request, you can directly input the running results. Netizens called it magic after the internal test.

Generate a cat wearing a hat and holding a pipe (a bit abstract):

ChatGPT can run its own code: when you submit a request, you can directly input the running results. Netizens called it magic after the internal test.

Generate website QR code:

ChatGPT can run its own code: when you submit a request, you can directly input the running results. Netizens called it magic after the internal test.

It’s no problem to make a relatively simple animation, such as "Blizzard":

Let’s listen to the sound again.

For example, to generate a Shepard tone (a pitch that sounds like it is rising or falling, but is actually just an infinite loop of pitches):

ChatGPT can run its own code: when you submit a request, you can directly input the running results. Netizens called it magic after the internal test.

Not only gave an explanation, but also generated a tone, which sounds like it really means something:

Sheppard tone audio generated by ChatGPT: ​00:0000:10​

Finally, there is text processing. Take the OCR algorithm as an example. This is an algorithm that recognizes pictures into a piece of text:

ChatGPT can run its own code: when you submit a request, you can directly input the running results. Netizens called it magic after the internal test.

After uploading an old photo, AI quickly recognizes it The corresponding text was output and converted into a .txt file, which looks pretty good:

ChatGPT can run its own code: when you submit a request, you can directly input the running results. Netizens called it magic after the internal test.

So, go one step further and try using ChatGPT to write the algorithm?

Write AI Algorithm

In addition to the face recognition algorithm mentioned at the beginning, which was generated by ChatGPT based on OpenCV, Andrew Mayne also tried the NLP algorithm this time.

Specifically, half of the sentence is given and the AI ​​predicts the next word. ChatGPT quickly gave the code:

ChatGPT can run its own code: when you submit a request, you can directly input the running results. Netizens called it magic after the internal test.

It looks good and the generated effect is how?

Andrew Mayne tried a sentence:

They went to the... (They went to...)

Usually this should be followed by a location noun, such as a beach or a church, etc. wait. However, after thinking about the AI ​​algorithm written by ChatGPT, it answered "shoulders"? ? ?

They went to the shoulders. (They went to the shoulders)

ChatGPT can run its own code: when you submit a request, you can directly input the running results. Netizens called it magic after the internal test.

Andrew Mayne joked that there is no need to worry about ChatGPT writing a GPT-4.

Generate the game engine

The last step is to generate the game engine. Andrew Mayne said "it's absolutely no problem", but did not give specific steps for ChatGPT.

This is the effect of generating a checkers engine (in addition, it can also generate a chess engine):

ChatGPT can run its own code: when you submit a request, you can directly input the running results. Netizens called it magic after the internal test.

It can also be used to generate a cellular automaton (Game of Life):

ChatGPT can run its own code: when you submit a request, you can directly input the running results. Netizens called it magic after the internal test.

The program written is not 100% correct

Some netizens said after reading it that the code interpreter plug-in fills in the ChatGPT very well" Bad Math” vulnerability:

ChatGPT has almost no math skills, but it can easily do it by generating Python code.

ChatGPT can run its own code: when you submit a request, you can directly input the running results. Netizens called it magic after the internal test.

#But many netizens found many bugs during this demonstration.

For example, although they are all Python programs that can be run, there are basically small errors that are obvious if you look closely, including:

  1. The method of generating Shepard's tone is wrong, Not only the amplitude must be adjusted, but also the frequency must be adjusted;
  2. There is also a problem with the generated Shepard tone itself. Normally the last tone should be the same as the first tone, so that the cycle can continue indefinitely;
  3. Using a cellular automaton to generate a QR code image is actually using the QR code image to push out the cellular automaton (however, the author here also admits that he "taught" ChatGPT to cheat)
  4. Planetary Orbit The orbits in the simulation are all circular orbits, which should be obvious ellipses from a scientific point of view.
  5. There are actually small bugs in graphics generation, so I won’t list them one by one.

ChatGPT can run its own code: when you submit a request, you can directly input the running results. Netizens called it magic after the internal test.

However, "you don't need to worry too much about these obvious bugs."

Some netizens feel that what really needs to be worried about is the ChatGPT "overlay" error" question.

Once something written by ChatGPT has a bug, you must immediately restart a new session, otherwise its errors will begin to multiply:

This feels like it is trying to hide something, very strange.

ChatGPT can run its own code: when you submit a request, you can directly input the running results. Netizens called it magic after the internal test.

Finally, although ChatGPT can already write a chess engine, some sharp-eyed netizens discovered that it still cannot play chess.

For example, suddenly use a horse to eat your own soldiers. (Manual dog head)

ChatGPT can run its own code: when you submit a request, you can directly input the running results. Netizens called it magic after the internal test.

Reference link:
[1]https://andrewmayneblog.wordpress.com/2023/03/23/chatgpt-code-interpreter- magic/
[2]https://news.ycombinator.com/item?id=35312609
[3]https://twitter.com/peteskomoroch/status/1639894112307679232​

The above is the detailed content of ChatGPT can run its own code: when you submit a request, you can directly input the running results. Netizens called it "magic" after the internal test.. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:51cto.com. If there is any infringement, please contact admin@php.cn delete