fix when RoleReactMode=REACT

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

View file

@ -337,9 +337,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()