agentscope.serialize module

The serialization module for the package.

agentscope.serialize.serialize(obj: Any) str[源代码]

Serialize the object to a JSON string.

For AgentScope, this function supports to serialize Msg object for now.

agentscope.serialize.deserialize(s: str) Any[源代码]

Deserialize the JSON string to an object

For AgentScope, this function supports to serialize Msg object for now.

agentscope.serialize.is_serializable(obj: Any) bool[源代码]

Check if the object is serializable in the scope of AgentScope.