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

GPT-4 self-repair, foreign brothers develop divine "Wolverine", unlimited self-Debug

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > IT Information >

Share

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

After the super evolution of GPT-4, it can still repair itself. Foreign netizens have developed a "Wolverine" project, which can automatically repair bug in Python and run code.

Ask the programmer, what is the most annoying time of day?

That must have been written for the program Debug. And now, the situation is about to be improved!

A foreign developer named BioBootloader has launched a project called Wolverine based on GPT-4, which can repair Python scripts by itself.

As can be seen from the name, the project focuses on "self-healing". Identify errors in the code through GPT and provide corrections until the program runs smoothly.

However, Wolverine can only be used on Python for now.

The project has collected 1.2k stars and 108Fork on GitHub.

Wolverine? Wolverine! BioBootloader said that if you run your program with Wolverine, as soon as it crashes, GPT-4 will automatically edit it and give the reason for the error.

Even if the programmer writes a lot of Bug, it's fine. Wolverine will run again and again until all the Bug is De.

GPT-4 must be no stranger to everyone. This is a multimodal artificial intelligence language model developed by OpenAI.

BioBootloader's demo video on Twitter shows how Wolverine is used.

In the video, the developer first writes a simple code for four operations, and then deliberately miswrites some of them.

(correct) for example, change the ending return result to return res, but res has no definition, so something goes wrong.

The little brother also deleted the subtraction code, which is the substract_numbers above. In this way, there is bound to be an error in the following calculate. Because there is no definition of subtract.

(wrong) then run Wolverine directly, and the section generated by GPT will appear on the right.

As you can see, Wolverine quickly identified the error and attached an explanation.

"subtract_numbers is not defined in the script.

The variable res is not defined and should be replaced by result. "

Not only did Wolverine give advice, but Wolverine also directly attached the modified code. Red is the part that should be deleted, and green is the part that is added.

In fact, Wolverine is a wrapper that runs the program, catches error messages, and sends those errors to GPT-4, asking what's wrong with the GPT code.

LLM (that is, large language models) like GPT-4 is "programmed" in the natural language, and these instructions are considered prompts.

Much of the functionality of Wolverine is due to carefully written tips, which can be read to better understand the whole process.

At present, the project has been released on GitHub. The younger brother is also considerate to give the requirements on the setting.

Not only is Python on GitHub, BioBootloader has released its own plans for the future, and Wolverine will become more and more comprehensive and powerful.

"the current version is just that it took me a few hours to build a prototype. There will be many possible extensions in the future, and you are welcome to develop it together. "

-add flags to customize the usage, such as asking the user to confirm before running the changed code.

-iterate further through the editing format of GPT. At the moment, GPT has some difficulty indenting, but I'm sure that can be improved.

-an example of a set of problematic files that we can prompt in the above test to ensure its reliability and measure how much improvement has been made.

-multiple files / code base-- sends all files that appear in the stack trace to GPT

-better handling of large files, that is, should we only send relevant classes / functions to GPT?

-extend to programming languages other than Python

From the simple example above, we can see that this script is still in the future.

After all, programmers working in other languages can't be jealous of Wolverine of Smart Debug Python.

Reference:

Https://twitter.com/bio_bootloader/status/1636880208304431104

Https://hackaday.com/2023/04/09/wolverine-gives-your-python-scripts-the-ability-to-self-heal/

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