fixbug: fix get_by_tags

This commit is contained in:
莘权 马 2023-08-29 11:40:13 +08:00
parent 91b7552f09
commit 0aaf04100c

View file

@ -92,13 +92,6 @@ class RoleContext(BaseModel):
def history(self) -> list[Message]:
return self.memory.get()
@property
def prerequisite(self):
"""Retrieve information with `prerequisite` tag"""
if self.memory and hasattr(self.memory, 'get_by_tags'):
return self.memory.get_by_tags([MessageTag.Prerequisite.value])
return ""
class Role:
"""Role/Proxy"""
@ -208,7 +201,7 @@ class Role:
# history=self.history)
logger.info(f"{self._setting}: ready to {self._rc.todo}")
requirement = self._rc.important_memory or self._rc.prerequisite
requirement = self._rc.important_memory
response = await self._rc.todo.run(requirement)
# logger.info(response)
if isinstance(response, ActionOutput):