Skip to content

Commit

Permalink
Merge pull request #28 from iorisa/feature/rfc116_shenquan
Browse files Browse the repository at this point in the history
fixbug: msg_to -> send_to
  • Loading branch information
garylin2099 authored Nov 30, 2023
2 parents 33729c6 + e4e6138 commit f01e0e9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/rfcs/RFC-116-MetaGPT优化方案.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,25 +191,25 @@ assert m.send_to == any_to_str_set({"b", Action})

1. `r1`发消息给所有`Werewolf`类对象:
```Python
env.publish_message(Message(content="...", msg_to=Werewolf))
env.publish_message(Message(content="...", send_to=Werewolf))
```
这里的`Werewolf`用的就是`Role`类的类名做标签。这个消息的接收者是所有的`Werewolf`类对象。

2. `r1`发消息给`c`和所有`Villager`类对象:
```Python
env.publish_message(Message(content="...", msg_to={Villager, "c"}))
env.publish_message(Message(content="...", send_to={Villager, "c"}))
```
这里的`Villager``Role`类的类名标签,`c``Role`对象`r3``name`属性。这个消息的接收者是所有`Villager`类对象,以及`name`属性为`c``Role`对象`r3`

3. `r1`发消息给所有对象:
```Python
env.publish_message(Message(content="...", msg_to="<all>"))
env.publish_message(Message(content="...", send_to="<all>"))
```
这个消息的接收者为所有群成员。

6. `r1`发消息给`c`, `d`, `e`:
```Python
env.publish_message(Message(content="...", msg_to={"c", "d", "e"}))
env.publish_message(Message(content="...", send_to={"c", "d", "e"}))
```
这个消息的接收者为`r3``r4``r5`
</td></tr>
Expand Down

0 comments on commit f01e0e9

Please sign in to comment.