Skip to content

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming

change investment keyword

geekane66c0cf0125e
diff --git a/metagpt/software_company.py b/metagpt/software_company.py
index 3f9999de2..9d5a174a4 100644
--- a/metagpt/software_company.py
+++ b/metagpt/software_company.py
@@ -34,9 +34,8 @@ class SoftwareCompany:
"""Hire roles to cooperate"""
self.environment.add_roles(roles)
- def invest(self, money: str):
+ def invest(self, investment: float):
"""Invest company. raise NoMoneyException when exceed max_budget."""
- investment = float(money.strip("$"))
self.investment = investment
self.config.max_budget = investment
diff --git a/startup.py b/startup.py
index 2b53468be..7463444ec 100644
--- a/startup.py
+++ b/startup.py
@@ -6,7 +6,7 @@ from metagpt.software_company import SoftwareCompany
from metagpt.roles import ProjectManager, ProductManager, Architect, Engineer
-async def startup(idea: str, investment: str = "$3.0", n_round: int = 5):
+async def startup(idea: str, investment: float = 3.0, n_round: int = 5):
"""Run a startup. Be a boss."""
company = SoftwareCompany()
company.hire([ProductManager(), Architect(), ProjectManager(), Engineer(n_borg=5)])
@@ -15,7 +15,7 @@ async def startup(idea: str, investment: str = "$3.0", n_round: int = 5):
await company.run(n_round=n_round)
-def main(idea: str, investment: str = "$3.0"):
+def main(idea: str, investment: float = 3.0):
"""
We are a software startup comprised of AI. By investing in us, you are empowering a future filled with limitless possibilities.
:param idea: Your innovative idea, such as "Creating a snake game."