This commit is contained in:
better629 2024-03-27 22:46:04 +08:00
parent 32d07eebc3
commit 257553d64d

View file

@ -89,7 +89,7 @@ class AndroidAssistant(Role):
"""ignore old memory to make it run multi rounds inside a role"""
newest_msgs = self.rc.memory.get(k=1)
newest_msg = newest_msgs[0] if newest_msgs else None
if newest_msg and (RunState.SUCCESS not in newest_msg.content):
if newest_msg and (RunState.SUCCESS.value not in newest_msg.content):
ignore_memory = False
logger.error("Latest action_state is FINISH or FAIL, won't react in remainder rounds")
return await super()._observe(ignore_memory)