feat: +cache

This commit is contained in:
莘权 马 2023-09-04 16:46:11 +08:00
parent c4a0bd1438
commit 230239b3e7

View file

@ -55,7 +55,7 @@ class BrainMemory(pydantic.BaseModel):
def history_text(self):
if len(self.history) == 0:
return ""
texts = []
texts = [self.historical_summary] if self.historical_summary else []
for m in self.history[:-1]:
if isinstance(m, Dict):
t = Message(**m).content