feat: merge geekan:main

This commit is contained in:
莘权 马 2023-12-22 17:04:31 +08:00
commit 073a10ce02
6 changed files with 75 additions and 15 deletions

20
examples/debate_simple.py Normal file
View file

@ -0,0 +1,20 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@Time : 2023/12/22
@Author : alexanderwu
@File : debate_simple.py
"""
import asyncio
from metagpt.actions import Action, UserRequirement
from metagpt.roles import Role
from metagpt.team import Team
action1 = Action(name="BidenSay", instruction="Use diverse words to attack your opponent, strong and emotional.")
action2 = Action(name="TrumpSay", instruction="Use diverse words to attack your opponent, strong and emotional.")
biden = Role(name="Biden", profile="democrat", goal="win election", actions=[action1], watch=[action2, UserRequirement])
trump = Role(name="Trump", profile="republican", goal="win election", actions=[action2], watch=[action1])
team = Team(investment=10.0, env_desc="US election live broadcast", roles=[biden, trump])
asyncio.run(team.run(idea="Topic: climate change", n_round=5))