mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-21 14:05:17 +02:00
fixbug: fix get_by_tags
This commit is contained in:
parent
2ba457a609
commit
91b7552f09
1 changed files with 3 additions and 1 deletions
|
|
@ -95,7 +95,9 @@ class RoleContext(BaseModel):
|
|||
@property
|
||||
def prerequisite(self):
|
||||
"""Retrieve information with `prerequisite` tag"""
|
||||
return self.memory.get_by_tags([MessageTag.Prerequisite.value])
|
||||
if self.memory and hasattr(self.memory, 'get_by_tags'):
|
||||
return self.memory.get_by_tags([MessageTag.Prerequisite.value])
|
||||
return ""
|
||||
|
||||
|
||||
class Role:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue