From 4dd9f7743f0d8dd3d4b2deb53b7a4d5e56d8bedc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8E=98=E6=9D=83=20=E9=A9=AC?= Date: Mon, 4 Sep 2023 19:53:35 +0800 Subject: [PATCH] feat: +cache --- metagpt/memory/brain_memory.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/metagpt/memory/brain_memory.py b/metagpt/memory/brain_memory.py index a974d95f6..dedea3b41 100644 --- a/metagpt/memory/brain_memory.py +++ b/metagpt/memory/brain_memory.py @@ -5,8 +5,8 @@ @Author : mashenquan @File : brain_memory.py @Desc : Support memory for multiple tasks and multiple mainlines. +@Modified By: mashenquan, 2023/9/4. + redis memory cache. """ -import hashlib import json from enum import Enum from typing import Dict, List @@ -74,10 +74,6 @@ class BrainMemory(pydantic.BaseModel): return None return last_msg.content - @staticmethod - def get_md5(text: str) -> str: - return hashlib.md5(text.encode()).hexdigest() - @staticmethod async def loads(redis_key: str, redis_conf: Dict = None) -> "BrainMemory": redis = Redis(conf=redis_conf)