mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-24 14:15:17 +02:00
remove useless code and format code
This commit is contained in:
parent
ebc4fe4b17
commit
57121ef395
14 changed files with 50 additions and 165 deletions
|
|
@ -68,9 +68,6 @@ def serialize_general_message(message: "Message") -> dict:
|
|||
mapping = actionoutput_mapping_to_str(mapping)
|
||||
|
||||
message_cp.instruct_content = {"class": schema["title"], "mapping": mapping, "value": ic.dict()}
|
||||
cb = message_cp.cause_by
|
||||
if cb:
|
||||
message_cp.cause_by = cb.ser_class()
|
||||
return message_cp.dict()
|
||||
|
||||
|
||||
|
|
@ -103,9 +100,6 @@ def deserialize_general_message(message_dict: dict) -> "Message":
|
|||
ic_obj = actionoutput_class.create_model_class(class_name=ic["class"], mapping=mapping)
|
||||
ic_new = ic_obj(**ic["value"])
|
||||
message.instruct_content = ic_new
|
||||
if cause_by:
|
||||
action_class = import_class("Action", "metagpt.actions.action")
|
||||
message.cause_by = action_class.deser_class(cause_by)
|
||||
|
||||
return message
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue