Skip to content

Commit

Permalink
change investment keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
geekan committed Jul 3, 2023
1 parent f6955b3 commit e66c0cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions metagpt/software_company.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ def hire(self, roles: list[Role]):
"""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

Expand Down
4 changes: 2 additions & 2 deletions startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
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)])
Expand All @@ -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."
Expand Down

0 comments on commit e66c0cf

Please sign in to comment.