-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Can you release some examples about how to use RoleReactMode #1667
Comments
The Regarding @role_raise_decorator
async def run(self, with_message=None) -> Message | None:
"""Observe, and think and act based on the results of the observation"""
......
if not await self._observe():
......
return
rsp = await self.react()
.......
return rsp async def react(self) -> Message:
"""Entry to one of three strategies by which Role reacts to the observed Message"""
if self.rc.react_mode == RoleReactMode.REACT or self.rc.react_mode == RoleReactMode.BY_ORDER:
rsp = await self._react()
elif ......
return rsp async def _react(self) -> Message:
......
while actions_taken < self.rc.max_react_loop:
# think
todo = await self._think()
if not todo:
break
# act
rsp = await self._act()
actions_taken += 1
return rsp # return output from the last action When |
This issue has no activity in the past 30 days. Please comment on the issue if you have anything to add. |
This issue was closed due to 45 days of inactivity. If you feel this issue is still relevant, please reopen the issue to continue the discussion. |
Feature description
All examples is
react_mode = BY_ORDER
.I know MetaGPT supporting
REACT or PLAN_AND_ACT
model, so could you release more example how to useREACT or PLAN_AND_ACT
.The text was updated successfully, but these errors were encountered: