Merge pull request #922 from lixiangtiandashen/debug

Update role.py : Role.set_actions()
This commit is contained in:
Alexander Wu 2024-02-28 10:56:59 +08:00 committed by GitHub
commit 04cd506df4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -281,7 +281,7 @@ class Role(SerializationMixin, ContextMixin, BaseModel):
i = action
self._init_action(i)
self.actions.append(i)
self.states.append(f"{len(self.actions)}. {action}")
self.states.append(f"{len(self.actions) - 1}. {action}")
def _set_react_mode(self, react_mode: str, max_react_loop: int = 1, auto_run: bool = True, use_tools: bool = False):
"""Set strategy of the Role reacting to observed Message. Variation lies in how