refactor: brain memory

This commit is contained in:
莘权 马 2023-09-07 21:42:35 +08:00
parent 24a3e72572
commit a4f36e0852

View file

@ -183,7 +183,7 @@ class BrainMemory(pydantic.BaseModel):
break
msgs.append(i)
total_length += delta
self.history = msgs
self.history = msgs.reverse()
self.is_dirty = True
await self.dumps(redis_key=CONFIG.REDIS_KEY, redis_conf=CONFIG.REDIS_CONF)
self.is_dirty = False