mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-14 15:25:17 +02:00
fixbug: prerequisite
This commit is contained in:
parent
308f83c82c
commit
0a494171fa
1 changed files with 3 additions and 2 deletions
|
|
@ -97,8 +97,9 @@ class RoleContext(BaseModel):
|
|||
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 ""
|
||||
vv = self.memory.get_by_tags([MessageTag.Prerequisite.value])
|
||||
return vv[-1:] if len(vv) > 1 else vv
|
||||
return []
|
||||
|
||||
|
||||
class Role:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue