feat: +cache

This commit is contained in:
莘权 马 2023-09-04 19:02:54 +08:00
parent 4d9cfe6f43
commit 26e35d799d

View file

@ -54,7 +54,7 @@ class BrainMemory(pydantic.BaseModel):
@property
def history_text(self):
if len(self.history) == 0:
if len(self.history) == 0 and not self.historical_summary:
return ""
texts = [self.historical_summary] if self.historical_summary else []
for m in self.history[:-1]: