Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use BaseModel uniformly and Ser&Deser #590

Merged
merged 96 commits into from
Dec 21, 2023
Merged

Conversation

better629
Copy link
Collaborator

@better629 better629 commented Dec 20, 2023

Rebase and Modified version of https://github.com/geekan/MetaGPT/tree/serialization

Feat

  1. update memory and so on to BaseModel
  2. add builtin_class_name to role/action to support list of roles/actions due to inherited problem.
  3. dump the serialized project into a structured folder to make it clear. btw, a whole serialized project file is also fine, but maybe huge if there are many messages.
  4. add more unittests to check the value of recovered module.

TODO

  1. There are some non-software roles and actions need to updated.
  2. It will serialize by default. If need a trigger please comment.

Doc
https://github.com/better629/MetaGPT-docs/blob/main/src/zh/guide/tutorials/breakpoint_recovery.md

ser&deser example project
team.zip

image

stellaHSR and others added 30 commits November 27, 2023 21:12
Basic code for serialization/deserialization and test cases
fix role and format ut of serialize_deserialize
@better629 better629 requested review from geekan and stellaHSR and removed request for geekan December 20, 2023 11:29
metagpt/roles/role.py Show resolved Hide resolved
metagpt/roles/product_manager.py Outdated Show resolved Hide resolved
metagpt/roles/product_manager.py Outdated Show resolved Hide resolved
metagpt/roles/product_manager.py Outdated Show resolved Hide resolved
metagpt/roles/product_manager.py Outdated Show resolved Hide resolved
metagpt/roles/qa_engineer.py Show resolved Hide resolved
metagpt/roles/sales.py Show resolved Hide resolved
metagpt/roles/searcher.py Show resolved Hide resolved
metagpt/team.py Show resolved Hide resolved
metagpt/utils/serialize.py Outdated Show resolved Hide resolved
@geekan
Copy link
Owner

geekan commented Dec 21, 2023

LGTM

@geekan geekan merged commit 9229b5a into geekan:main Dec 21, 2023
@better629 better629 deleted the new_main branch December 21, 2023 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants