mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-06 06:12:39 +02:00
refactor: brain memory
This commit is contained in:
parent
7abb1a3b93
commit
c36e1d6f1a
1 changed files with 6 additions and 1 deletions
|
|
@ -103,7 +103,7 @@ class BrainMemory(pydantic.BaseModel):
|
|||
|
||||
@staticmethod
|
||||
def to_redis_key(prefix: str, user_id: str, chat_id: str):
|
||||
return f"{prefix}:{chat_id}:{user_id}"
|
||||
return f"{prefix}:{user_id}:{chat_id}"
|
||||
|
||||
async def set_history_summary(self, history_summary, redis_key, redis_conf):
|
||||
if self.historical_summary == history_summary:
|
||||
|
|
@ -294,4 +294,9 @@ class BrainMemory(pydantic.BaseModel):
|
|||
else:
|
||||
return None, input_string
|
||||
|
||||
def set_llm_type(self, v):
|
||||
if v:
|
||||
self.llm_type = v
|
||||
self.is_dirty = True
|
||||
|
||||
DEFAULT_TOKEN_SIZE = 500
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue