mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-02 12:22:39 +02:00
feat: +to_redis_key
This commit is contained in:
parent
26c4ed6e22
commit
d6130c2d99
1 changed files with 4 additions and 0 deletions
|
|
@ -109,3 +109,7 @@ class BrainMemory(pydantic.BaseModel):
|
|||
return False
|
||||
v = self.json()
|
||||
await redis.set(key=redis_key, data=v, timeout_sec=timeout_sec)
|
||||
|
||||
@staticmethod
|
||||
def to_redis_key(prefix: str, user_id: str, chat_id: str):
|
||||
return f"{prefix}:{chat_id}:{user_id}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue