This ‘self-healing’ program can debug Python code in seconds
- by anlene
In the Wolverine demo video, BioBootloader displays a side-by-side window display with “Wolverine” results in a terminal on the right and Python code on the left. It loads a customized calculator script, introduces a few flaws, and runs it.
“It runs it, it sees the crash, but then it goes and talks to GPT-4 to figure out how to fix it,” he says. GPT-4 returns an explanation for the program’s errors, shows the changes it tries to make, then re-runs the program. Upon seeing new errors, GPT-4 fixes the code and runs correctly. The original Python file is then updated with the changes added by GPT-4.
Today I used GPT-4 to make “Wolverine” – it gives your python scripts regenerative healing abilities!
Run your scripts with it and when they crash, GPT-4 edits them and explains what went wrong. Even if you have many bugs it’ll repeatedly rerun until everything is fixed pic.twitter.com/gN0X7pA2M2
— BioBootloader (@bio_bootloader) March 18, 2023
“LLMs (Large Language Models) like GPT-4 are “programmed” in natural language, and these instructions are referred to as prompts. A large chunk of what Wolverine does is thanks to a carefully-written prompt,” explains Hackaday.
The creator thinks the method could be used with other programming languages, and the source is accessible on GitHub. “Wolverine” must be used with an OpenAI API token for GPT-3.5 or GPT-4, which does attract fees. Anyone with an OpenAI account can access the GPT 3.5 API. However, GPT-4 access is still limited by a queue.
In the Wolverine demo video, BioBootloader displays a side-by-side window display with “Wolverine” results in a terminal on the right and Python code on the left. It loads a customized calculator script, introduces a few flaws, and runs it. “It runs it, it sees the crash, but then it goes and talks to GPT-4 to…
Recent Posts
- Glowing Skin: 10 House Treatments That Work
- Unraveling the Significance of Pafikotcurup.org: A Nexus of Knowledge and Engagement
- The Drive: Automotive News And Evaluations For Enthusiasts
- Beauty Ideas And Tricks: Natural Beauty Tips For Glowing Pores And Skin, Face, Hair For Women And Girls
- Tiktokers Declare Consuming Filth Has Health Advantages Listed Right Here Are The Issues