mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-11 15:15:18 +02:00
refactor: brain memory
This commit is contained in:
parent
f92aeb0e50
commit
1b267d34dc
1 changed files with 1 additions and 1 deletions
|
|
@ -161,7 +161,7 @@ class BrainMemory(pydantic.BaseModel):
|
|||
text_length = len(text)
|
||||
|
||||
max_count -= 1 # safeguard
|
||||
if not summary:
|
||||
if summary:
|
||||
await self.set_history_summary(history_summary=summary, redis_key=CONFIG.REDIS_KEY, redis_conf=CONFIG.REDIS)
|
||||
return summary
|
||||
raise openai.error.InvalidRequestError("text too long")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue