GPT-Engineer exploded overnight! A tip generates the entire code base, GitHub hurricane 19k stars

Xi Xiaoyao's technology sharing
source | Xinzhiyuan

Writing code with your mouth is just around the corner! The star project of AI code generation, GPT-Engineer, exploded overnight, earning 19k stars in just a few days.

After AutoGPT, another star project was born!

GPT-Engineer became popular all over the Internet overnight, and the GitHub project has garnered 19k stars.

This is an AI tool that generates code according to instructions. You only need to "move your mouth" to directly build the entire code base.

Project address:
https://github.com/AntonOsika/gpt-engineer

Large model research test portal

GPT-4 capability research portal (advanced/continue to visit in case of browser warning):
https://gpt4test.com

Even, it can learn your coding style, allowing you to complete coding projects in just a few minutes.

Netizens said that we are one step closer to AGI.

Programmers will be eliminated again.

One-Sentence Tips for Creating a Code Base

In just one week, GPT-Engineer became popular on GitHub, attracting many developers to watch.

How attractive is it?

Anton Osika, the main author of the project, first launched GPT-Engineer on June 11, and introduced the biggest features of this AI tool:

  • One hint can generate a code base
  • Ask questions that need clarification
  • Generate technical specifications
  • Write all the necessary code
  • Easy to add your own inference steps, modifications and experiments
  • Project open source
  • Let you complete the coding in minutes

Imagine that in the future, without writing a single line of code, creating a project is as easy as chatting with a friend.

This is not just a project, but a glimpse into the future.

GPT-Engineer heralds that future software creation will be an era where man and machine talk together.

In addition, according to GitHub, the main project concept of GPT-Engineer is introduced:

  • Simple and easy to use, able to provide value to users;
  • Flexible and easy to add new "AI steps";
  • Support advanced prompts, which can remember user feedback;
  • Can quickly switch between AI and humans;
  • All computations are "resumable" and persisted to the file system.

What is unique about this project is that developers submit requirements in text files, and GPT-Engineer does not accept these requirements unconditionally, but asks many detailed questions to allow programmers to clarify missing details.

The whole process is executed in two phases, namely (1) requirements refinement promotion phase and (2) software construction phase.

The steps in the first phase are:

A user-supplied text file containing software requirements is submitted to GPT-Engineer and placed in OpenAI's GPT's initial message, along with instructions for identifying clarification questions.

The GPT-Engineer system receives feedback from OpenAI GPT-4, understands which requirements need clarification, and responds to questions that prompt users for clarification.

GPT-Engineer will cycle this process until all issues are clarified to the satisfaction of OpenAI GPT-4.

The steps in the second phase are:

The requirements refined in the previous stage are packaged and packaged together with OpenAI's GPT instructions (ie, system prompts) and another set of output instructions that GPT-Engineer wants to see (ie, user prompts).

GPT-Engineer receives a response from OpenAI GPT-4, and…

GPT-Engineer creates source code files for software projects for which the user provides instructions.

Snake-eating hands-on practice

Having said so much, it is better to try it out. Make a multiplayer Snake web version game.

You just need to enter some key hints:

Using a Python backend with MVC components, the view needs to stream the state to all players, run the html and js directly with the code you generate.

For this game code generation, GPT-Engineer will let you continue to answer some detailed questions.

Game rules and mechanics: Give exactly how the snake moves, grows, and interacts with other players, are there any power-ups, or special game elements?

Player Connect: How many players can join the game, is there a lobby or matchmaking?

Game State Updates: How often is the game state updated, how often is the state streamed to the player, and what is the latency rate?

User Interface: What does the game interface look like? Have any special design needs and preferences?

Game Controls: How does the player control the snake? Are there other controls or settings?

Game End Conditions: How does the game end? Is there a scoring system or leaderboard?

Code structure: Are there any specific requirements for the organization of the Python backend, HTML, and JavaScript code?

After you simply answer these questions, GPT-Engineer will give a list of files, classes and methods needed to achieve the goal based on this information.

The specific steps came in a hurry.

The code of the last perfect snake game is completed.

Hot comments from netizens

Netizens said that "clarifying the problem" is what really makes GPT-Engineer stand out, because fixing problems in the generated code often takes more time than writing the code itself. This seems like a big step in the right direction.

I wish I had a weapon like this when I was in school.

Some netizens are confused about the difference between GPT-Engineer and GPT-4.

However, despite the popularity of this project, a netizen tested GPT-Engineer and gave his experience:

difficult to set up

Doesn't actually create the file, just lets you run it once from the command line (i.e. no debugging)

Comparable to the capabilities of ChatGPT4

In conclusion, the ideal is full, but the reality is skinny.

Some netizens pointed out problems with the benchmark,

gpt-engineer did several simple programming tasks and used them as benchmarks. It can quickly develop a currency_converter for you, but cannot properly code a pomodoro_timer (yet!)

installation method

Either choose the stable version (stable), or choose the development version (development).

For stable releases:

pip install gpt-engineer

For development version:

git clone [email protected]:AntonOsika/gpt-engineer.git
cd gpt-engineer
make install
source venv/bin/activate

set up

使用GPT4访问权限的API密钥运行:
export OPENAI_API_KEY=[your api key]

run

Create an empty folder. If in the repo, you can run:

cp -r projects/example/ projects/my-new-project
在新文件夹中填写 main_prompt 文件
运行:gpt-engineer projects/my-new-project

result

检查 projects/my-new-project/workspace 中生成的文件

limit

Using additional thought chain hints, like Reaffon, should make it more reliable and not miss features requested in the main hint.

features

You can specify an AI agent's "identity" by editing files in the identity folder.

Editing the "identity" and improving the main_prompt are ways for the agent to remember things between items.

Each step in steps.py stores its conversation history with GPT4 in the logs folder and can be rerun with scripts/rerun_edited_message_logs.py.

Project lead author

Anton Osika

Anton Osika is the CTO of Depict.ai. This is a startup creating a machine learning recommender system that uses cutting-edge machine learning, computer vision, and natural language processing to understand products.

Just 4 hours ago, he also posted a dynamic saying that GPT-Engineer has jumped to 17k stars, and there is no sign of slowing down at all.

References

[1]https://github.com/AntonOsika/gpt-engineer
[2]https://twitter.com/rowancheung/status/1670829363137499137
[3]https://twitter.com/antonosika/status/1667641038104674306
[4]https://twitter.com/antonosika

Guess you like

Origin blog.csdn.net/xixiaoyaoww/article/details/131314728