-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
refactor: optimizing act_by_order mode of Role
#1234
Conversation
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. PR Description updated to latest commit (6505087)
|
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. PR Review
✨ Review tool usage guide:Overview: The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.
See the review usage page for a comprehensive guide on using this tool. |
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. PR Code Suggestions
✨ Improve tool usage guide:Overview:
See the improve usage page for a comprehensive guide on using this tool. |
Role
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #1234 +/- ##
==========================================
+ Coverage 82.29% 82.39% +0.09%
==========================================
Files 250 250
Lines 13892 13882 -10
==========================================
+ Hits 11433 11438 +5
+ Misses 2459 2444 -15 ☔ View full report in Codecov by Sentry. |
User description
Features
Optimizing the codes of the
act_by_order
pattern ofRole
: Implemented theact_by_order
pattern using the framework of thereact
pattern ofRole
.Type
enhancement
Description
RoleReactMode.BY_ORDER
intoProductManager
andRole
classes, simplifying the action management.Changes walkthrough
product_manager.py
Simplify and Integrate RoleReactMode in ProductManager
metagpt/roles/product_manager.py
_think
method and related condition checks.RoleReactMode.BY_ORDER
directly into theProductManager
class.
WritePRD
totodo_action
.role.py
Enhance Role Class with BY_ORDER Mode Handling
metagpt/roles/role.py
RoleReactMode.BY_ORDER
in_think
method to manageaction sequence.
_act_by_order
method and integrated its logic into_react
.REACT
andBY_ORDER
modes.test_product_manager.py
Update ProductManager Tests to Reflect New Logic
tests/metagpt/roles/test_product_manager.py
PrepareDocuments
as its direct call has beeneliminated.
WritePRD
.