From 79d0d92a29f0af7cd9381f95c35cbb1b76f90ba5 Mon Sep 17 00:00:00 2001 From: AllfatherHatt Date: Fri, 21 Feb 2025 02:30:23 +0100 Subject: [PATCH] Trying to optimize summary --- reginaldCog/reginald.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/reginaldCog/reginald.py b/reginaldCog/reginald.py index 7621994..1c7c991 100644 --- a/reginaldCog/reginald.py +++ b/reginaldCog/reginald.py @@ -140,12 +140,17 @@ class ReginaldCog(commands.Cog): async def summarize_memory(self, ctx, messages): """✅ Generates a summary of past conversations for mid-term storage.""" summary_prompt = ( - "Analyze and summarize the following conversation in a way that retains key details, nuances, and unique insights. " - "Your goal is to create a structured yet fluid summary that captures important points without oversimplifying. " - "Maintain resolution on individual opinions, preferences, debates, and shared knowledge. " - "If multiple topics are discussed, summarize each distinctly rather than blending them together." + "Summarize the following conversation with a focus on efficiency and clarity. " + "Compress information intelligently—prioritize key details, decisions, unique insights, and user contributions. " + "Maintain resolution: avoid excessive generalization. " + "Structure the summary into distinct topics with clear subpoints. " + "Ensure that individual opinions, disagreements, and conclusions are retained. " + "If multiple topics exist, separate them clearly rather than blending them into one. " + "Omit filler words, excessive pleasantries, and redundant phrases. " + "Ensure the summary is direct, well-structured, and information-dense." ) + summary_text = "\n".join(f"{msg['user']}: {msg['content']}" for msg in messages) try: