development #1

Merged
AllfatherHatt merged 157 commits from development into master 2025-06-14 15:47:26 +02:00
Showing only changes of commit 8a54890f56 - Show all commits

View File

@ -113,12 +113,9 @@ class ReginaldCog(commands.Cog):
memory.append({"user": "Reginald", "content": response_text}) memory.append({"user": "Reginald", "content": response_text})
# ✅ Compute dynamic values for summarization and retention # ✅ Compute dynamic values for summarization and retention
messages_to_summarize = int(self.short_term_memory_limit * self.summary_retention_rati messages_to_summarize = int(self.short_term_memory_limit * self.summary_retention_ratio)
o)
messages_to_retain = self.short_term_memory_limit - messages_to_summarize messages_to_retain = self.short_term_memory_limit - messages_to_summarize
MINIMUM_SHORT_TERM_MESSAGES = 10
messages_to_retain = max(messages_to_retain, MINIMUM_SHORT_TERM_MESSAGES)
# ✅ Check if pruning is needed # ✅ Check if pruning is needed
if len(memory) > self.short_term_memory_limit: if len(memory) > self.short_term_memory_limit:
summary = await self.summarize_memory(ctx, memory[:messages_to_summarize]) summary = await self.summarize_memory(ctx, memory[:messages_to_summarize])