From d36b4e2088c4a2e48c4f1ab63fc9c41c163bbaf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8E=98=E6=9D=83=20=E9=A9=AC?= Date: Fri, 10 Nov 2023 15:41:27 +0800 Subject: [PATCH] refactor: replace obj with role --- metagpt/environment.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metagpt/environment.py b/metagpt/environment.py index e9a5c6467..b3c296dac 100644 --- a/metagpt/environment.py +++ b/metagpt/environment.py @@ -61,9 +61,9 @@ class Environment(BaseModel): logger.info(f"publish_message: {message.dump()}") found = False # According to the routing feature plan in Chapter 2.2.3.2 of RFC 113 - for obj, subscription in self.consumers.items(): + for role, subscription in self.consumers.items(): if is_subscribed(message, subscription): - obj.put_message(message) + role.put_message(message) found = True if not found: logger.warning(f"Message no recipients: {message.dump()}")