forked from Link-AGI/AutoAgents
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstartup.py
17 lines (15 loc) · 865 Bytes
/
startup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from autoagents.roles import Manager, ObserverAgents, ObserverPlans
from autoagents.explorer import Explorer
async def startup(idea: str, investment: float = 3.0, n_round: int = 10, task_id=None,
llm_api_key: str=None, serpapi_key: str=None, proxy: str=None, alg_msg_queue: object=None):
"""Run a startup. Be a boss."""
explorer = Explorer()
explorer.hire([Manager(proxy=proxy, llm_api_key=llm_api_key),
ObserverAgents(proxy=proxy, llm_api_key=llm_api_key),
ObserverPlans(proxy=proxy, llm_api_key=llm_api_key),
])
explorer.invest(investment)
await explorer.start_project(idea=idea, llm_api_key=llm_api_key, proxy=proxy, serpapi_key=serpapi_key, task_id=task_id, alg_msg_queue=alg_msg_queue)
await explorer.run(n_round=n_round)