mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-17 15:35:21 +02:00
update critic_agent use
This commit is contained in:
parent
dc0fd134fb
commit
d998a48cd2
3 changed files with 4 additions and 4 deletions
|
|
@ -46,7 +46,7 @@ class ActionDeveloper(Base):
|
|||
self._watch([RetrieveSkills])
|
||||
self.rollout_num_iter = 0
|
||||
self.task_max_retries = 4
|
||||
self.critic_reviewer = CriticReviewer()
|
||||
self.critic_reviewer = agent_registry["critic_agent"]
|
||||
|
||||
def render_system_message(self, skills=[], *args, **kwargs):
|
||||
"""
|
||||
|
|
@ -190,7 +190,7 @@ class ActionDeveloper(Base):
|
|||
|
||||
async def run_step(self, human_msg, system_msg, *args, **kwargs):
|
||||
while True:
|
||||
messages, reward, done, info = self.runcode_and_evaluate(human_msg, system_msg, *args, **kwargs)
|
||||
messages, reward, done, info = await self.runcode_and_evaluate(human_msg, system_msg, *args, **kwargs)
|
||||
if done:
|
||||
break
|
||||
return messages, reward, done, info
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class CriticReviewer(Base):
|
|||
|
||||
# Set events or actions the CriticReviewer should watch or be aware of
|
||||
# 需要获取最新的events来进行评估
|
||||
self._watch([GenerateActionCode, AddNewSkills])
|
||||
self._watch([])
|
||||
|
||||
async def run(self, message=None):
|
||||
"""Observe, only get the observation"""
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ async def learn(task="Start", investment: float = 50.0, n_round: int = 3):
|
|||
[
|
||||
CurriculumDesigner(),
|
||||
ActionDeveloper(),
|
||||
# CriticReviewer(),
|
||||
CriticReviewer(),
|
||||
SkillManager(),
|
||||
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue