modelscope / agentscope

Start building LLM-empowered multi-agent applications in an easier way.
https://doc.agentscope.io/
Apache License 2.0
4.81k stars 294 forks source link

Support to serialize message objects in AgentScope and remove unused arguments. #388

Closed DavdGao closed 2 weeks ago

DavdGao commented 1 month ago

Description

About Serialization

  1. Add a new serialize and deserialize function in AgentScope, which is responsible for serialization and deserialization in our library in the future;

About Message [IMPORTANT CHANGE]

  1. Msg class doesn't inherit dict any more.
  2. Remove timestamp and name variables from local attributes of placeholder class, since they are actually decided by the distributed agent.
  3. Remove MessageBase class

Others

  1. Remove unused parameter memory_config from the memory module;
  2. Add test for message class
  3. Modify unit tests accordingly

Note

In this PR, we only serialize and deserialize the message objects, leaving agent serialization in the future to keep this PR compact and simple.

Checklist

Please check the following items before code is ready to be reviewed.