mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-04-30 11:26:23 +02:00
feat: +cache
This commit is contained in:
parent
63805c87f9
commit
4dd9f7743f
1 changed files with 1 additions and 5 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue