fix when RoleReactMode=REACT

This commit is contained in:
better629 2023-12-01 21:07:47 +08:00
parent 0f2d96a7e2
commit 3679d77f0d
2 changed files with 3 additions and 2 deletions

View file

@ -417,9 +417,9 @@ class Role(BaseModel):
# If there is only one action, then only this one can be performed
self._set_state(0)
return
if self._recovered and self._rc.state >= 0:
if self.recovered and self._rc.state >= 0:
self._set_state(self._rc.state) # action to run from recovered state
self._recovered = False # avoid max_react_loop out of work
self.recovered = False # avoid max_react_loop out of work
return
prompt = self._get_prefix()