From 18d6793f18043fc088c03a4182f163c01ab24b6a Mon Sep 17 00:00:00 2001 From: Sarah Wooders Date: Mon, 28 Apr 2025 20:59:07 -0700 Subject: [PATCH] fix: fix docker image (#1920) --- letta/services/summarizer/summarizer.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/letta/services/summarizer/summarizer.py b/letta/services/summarizer/summarizer.py index d8a52efa..dbcd76db 100644 --- a/letta/services/summarizer/summarizer.py +++ b/letta/services/summarizer/summarizer.py @@ -104,18 +104,20 @@ class Summarizer: formatted_evicted_messages[i] = f"{line_number}. " + formatted_evicted_messages[i] line_number += 1 for i in range(len(formatted_in_context_messages)): - formatted_evicted_messages[i] = f"{line_number}. " + formatted_evicted_messages[i] + formatted_in_context_messages[i] = f"{line_number}. " + formatted_in_context_messages[i] line_number += 1 + evicted_messages_str = "\n".join(formatted_evicted_messages) + in_context_messages_str = "\n".join(formatted_in_context_messages) summary_request_text = f"""You are a specialized memory recall agent assisting another AI agent by asynchronously reorganizing its memory storage. The LLM agent you are helping maintains a limited context window that retains only the most recent {self.message_buffer_min} messages from its conversations. The provided conversation history includes messages that are about to be evicted from its context window, as well as some additional recent messages for extra clarity and context. Your task is to carefully review the provided conversation history and proactively generate detailed, relevant memories about the human participant, specifically targeting information contained in messages that are about to be evicted from the context window. Your notes will help preserve critical insights, events, or facts that would otherwise be forgotten. (Older) Evicted Messages: -{"\n".join(formatted_evicted_messages)} +{evicted_messages_str} (Newer) In-Context Messages: -{"\n".join(formatted_in_context_messages)} +{in_context_messages_str} """ # Fire-and-forget the summarization task