mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-15 11:02:36 +02:00
serialize mgxenv
This commit is contained in:
parent
98ac5fbce3
commit
d98d36fec5
1 changed files with 3 additions and 3 deletions
|
|
@ -28,9 +28,6 @@ class MGXEnv(Environment):
|
|||
|
||||
default_serialization_path: ClassVar[str] = str(SERDESER_PATH / "mgxenv" / "mgxenv.json")
|
||||
|
||||
def __repr__(self):
|
||||
return "MGXEnv()"
|
||||
|
||||
def _publish_message(self, message: Message, peekable: bool = True) -> bool:
|
||||
return super().publish_message(message, peekable)
|
||||
|
||||
|
|
@ -130,6 +127,9 @@ class MGXEnv(Environment):
|
|||
converted_msg.content = f"from {sent_from} to {converted_msg.send_to}: {converted_msg.content}"
|
||||
return converted_msg
|
||||
|
||||
def __repr__(self):
|
||||
return "MGXEnv()"
|
||||
|
||||
@handle_exception
|
||||
def serialize(self, file_path: str = None) -> str:
|
||||
"""Serializes the current instance to a JSON file.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue