mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-14 15:25:17 +02:00
fixbug: last_talk
This commit is contained in:
parent
d79a0638f2
commit
b0966ca541
1 changed files with 0 additions and 9 deletions
|
|
@ -66,15 +66,6 @@ class BrainMemory(pydantic.BaseModel):
|
|||
|
||||
return "\n".join(texts)
|
||||
|
||||
@property
|
||||
def last_talk(self):
|
||||
if len(self.history) == 0:
|
||||
return None
|
||||
last_msg = Message(**self.history[-1])
|
||||
if not last_msg.is_contain(MessageType.Talk.value):
|
||||
return None
|
||||
return last_msg.content
|
||||
|
||||
@staticmethod
|
||||
async def loads(redis_key: str, redis_conf: Dict = None) -> "BrainMemory":
|
||||
redis = Redis(conf=redis_conf)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue