mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-07-23 17:01:08 +02:00
添加UI基础角色代码,测试流程
This commit is contained in:
parent
4812a50cbd
commit
b402f5a17e
4 changed files with 15 additions and 6 deletions
|
|
@ -114,6 +114,7 @@ class Role:
|
|||
def _set_state(self, state):
|
||||
"""Update the current state."""
|
||||
self._rc.state = state
|
||||
logger.info(self._actions)
|
||||
self._rc.todo = self._actions[self._rc.state]
|
||||
|
||||
def set_env(self, env: 'Environment'):
|
||||
|
|
@ -170,8 +171,11 @@ class Role:
|
|||
if not self._rc.env:
|
||||
return 0
|
||||
env_msgs = self._rc.env.memory.get()
|
||||
|
||||
observed = self._rc.env.memory.get_by_actions(self._rc.watch)
|
||||
|
||||
already_observed = self._rc.memory.get()
|
||||
|
||||
news: list[Message] = []
|
||||
for i in observed:
|
||||
if i in already_observed:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue