mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-26 15:49:42 +02:00
update code
This commit is contained in:
parent
c1c1d22cff
commit
7d14a85329
6 changed files with 38 additions and 19 deletions
|
|
@ -13,7 +13,7 @@ from metagpt.minecraft_team import MinecraftPlayer
|
|||
|
||||
async def learn(task="Start", investment: float = 50.0, n_round: int = 3):
|
||||
mc_player = MinecraftPlayer()
|
||||
mc_player.set_port(1077) # Modify this to your Minecraft LAN port
|
||||
mc_player.set_port(33141) # Modify this to your Minecraft LAN port
|
||||
# mc_player.set_resume(True) # If load json from ckpt dir(include chest_memory, skills, ...)
|
||||
mc_player.hire(
|
||||
[
|
||||
|
|
@ -24,7 +24,8 @@ async def learn(task="Start", investment: float = 50.0, n_round: int = 3):
|
|||
|
||||
]
|
||||
)
|
||||
|
||||
print(mc_player.environment.roles)
|
||||
print(mc_player.environment.roles["Generate code for specified tasks"]._rc)
|
||||
mc_player.invest(investment)
|
||||
mc_player.start(task)
|
||||
await mc_player.run(n_round=n_round)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue