mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-29 15:59:42 +02:00
serdeser rebase from main
This commit is contained in:
commit
dd640991b7
15 changed files with 91 additions and 11 deletions
|
|
@ -61,6 +61,7 @@ async def test_publish_and_process_message(env: Environment):
|
|||
constraints="资源有限,需要节省成本")
|
||||
|
||||
env.add_roles([product_manager, architect])
|
||||
|
||||
env.set_manager(Manager())
|
||||
env.publish_message(Message(role="User", content="需要一个基于LLM做总结的搜索引擎", cause_by=UserRequirement))
|
||||
|
||||
|
|
|
|||
|
|
@ -8,16 +8,22 @@
|
|||
the utilization of the new feature of `Message` class.
|
||||
"""
|
||||
|
||||
<<<<<<< HEAD
|
||||
import json
|
||||
|
||||
import pytest
|
||||
|
||||
from metagpt.actions import Action
|
||||
=======
|
||||
>>>>>>> a69be36abf7beef1a989a707d1aa027948c07fee
|
||||
from metagpt.schema import AIMessage, Message, SystemMessage, UserMessage
|
||||
from metagpt.actions.action_output import ActionOutput
|
||||
from metagpt.actions.write_code import WriteCode
|
||||
from metagpt.utils.serialize import serialize_general_message, deserialize_general_message
|
||||
<<<<<<< HEAD
|
||||
from metagpt.utils.common import get_class_name
|
||||
=======
|
||||
>>>>>>> a69be36abf7beef1a989a707d1aa027948c07fee
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
|
@ -110,7 +116,3 @@ def test_message_serdeser():
|
|||
new_message = deserialize_general_message(message_dict)
|
||||
assert new_message.instruct_content is None
|
||||
assert new_message.cause_by == ""
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
pytest.main([__file__, "-s"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue