mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-14 15:25:17 +02:00
feat: merge geekan:main
This commit is contained in:
commit
073a10ce02
6 changed files with 75 additions and 15 deletions
20
examples/debate_simple.py
Normal file
20
examples/debate_simple.py
Normal 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))
|
||||
Loading…
Add table
Add a link
Reference in a new issue