mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-04-26 01:06:27 +02:00
feat: send_to="Edward", # name of QaEngineer
This commit is contained in:
commit
2d1d55f7cb
3 changed files with 4 additions and 6 deletions
|
|
@ -103,14 +103,11 @@ class Engineer(Role):
|
|||
# Unit tests only.
|
||||
if CONFIG.REQA_FILENAME and CONFIG.REQA_FILENAME not in changed_files:
|
||||
changed_files.add(CONFIG.REQA_FILENAME)
|
||||
|
||||
from metagpt.roles import QaEngineer # Avoid circular references.
|
||||
|
||||
msg = Message(
|
||||
content="\n".join(changed_files),
|
||||
role=self.profile,
|
||||
cause_by=WriteCodeReview if self.use_code_review else WriteCode,
|
||||
send_to=QaEngineer,
|
||||
send_to="Edward", # name of QaEngineer
|
||||
)
|
||||
return msg
|
||||
|
||||
|
|
|
|||
|
|
@ -214,6 +214,7 @@ class Role:
|
|||
)
|
||||
else:
|
||||
msg = Message(content=response, role=self.profile, cause_by=self._rc.todo)
|
||||
self._rc.memory.add(msg)
|
||||
|
||||
return msg
|
||||
|
||||
|
|
@ -222,9 +223,10 @@ class Role:
|
|||
# Read unprocessed messages from the msg buffer.
|
||||
news = self._rc.msg_buffer.pop_all()
|
||||
# Store the read messages in your own memory to prevent duplicate processing.
|
||||
old_messages = self._rc.memory.get()
|
||||
self._rc.memory.add_batch(news)
|
||||
# Filter out messages of interest.
|
||||
self._rc.news = [n for n in news if n.cause_by in self._rc.watch]
|
||||
self._rc.news = [n for n in news if n.cause_by in self._rc.watch and n not in old_messages]
|
||||
|
||||
# Design Rules:
|
||||
# If you need to further categorize Message objects, you can do so using the Message.set_meta function.
|
||||
|
|
|
|||
|
|
@ -74,5 +74,4 @@ class SkAgent(Role):
|
|||
|
||||
msg = Message(content=result, role=self.profile, cause_by=self._rc.todo)
|
||||
self._rc.memory.add(msg)
|
||||
self.publish_message(msg)
|
||||
return msg
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue