This commit is contained in:
AllfatherHatt 2025-02-25 21:24:55 +01:00
parent 6329d21a39
commit 4dbee1d990

View File

@ -173,6 +173,8 @@ class ReginaldCog(commands.Cog):
memory.append({"user": user_name, "content": prompt})
memory.append({"user": "Reginald", "content": response_text})
summary = None # ✅ Always define it first
if len(memory) > SHORT_TERM_LIMIT:
summary = await self.summarize_memory(message, memory[:int(SHORT_TERM_LIMIT * SUMMARY_RETENTION_RATIO)])