python startup.py "write p5.js code for Flappy Bird where you control a yellow bird continuously flying between a series of green pipes. The bird flaps every time you left click the mouse. If the bird falls to the ground or hits a pipe, you lose. This game goes on infinitely until you lose and you get points the further you go" --code_review True
python startup.py "Write a cli snake game" # 使用code review模式会增加开销,但同时也会提升代码质量和成功率 python startup.py "Write a cli snake game" --code_review True
运行脚本后,就可以在workspace/目录中找到你的新项目了。
平台或工具的偏好
你可以在陈述需求时,说明自己想要使用的平台或工具。
python startup.py "Write a cli snake game based on pygame"
使用
NAME startup.py - We are a software startup comprised of AI. By investing in us, you are empowering a future filled with limitless possibilities.
SYNOPSIS startup.py IDEA
DESCRIPTION We are a software startup comprised of AI. By investing in us, you are empowering a future filled with limitless possibilities. # 我们是一家AI软件创业公司。通过投资我们,您将赋能一个充满无限可能的未来。
POSITIONAL ARGUMENTS IDEA Type: str 你的创新想法,例如"Creating a snake game."
FLAGS --investment=INVESTMENT Type: float Default: 3.0 As an investor, you have the opportunity to contribute a certain dollar amount to this AI company. # 作为投资者,您有机会向这家AI公司投入一定的美元金额。 --n_round=N_ROUND Type: int Default: 5
NOTES 也可以用FLAGS的语法,来处理POSITIONAL ARGUMENTS。
代码实现
from metagpt.software_company import SoftwareCompany from metagpt.roles import ProjectManager, ProductManager, Architect, Engineer
asyncdefstartup(idea: str, investment: float = 3.0, n_round: int = 5): """Run a startup. Be a boss.""" company = SoftwareCompany() company.hire([ProductManager(), Architect(), ProjectManager(), Engineer()]) company.invest(investment) company.start_project(idea) await company.run(n_round=n_round)