From 0bea5e38a4defa19fc7e560cbacd089d318c0c3b Mon Sep 17 00:00:00 2001 From: Toran Bruce Richards Date: Sun, 30 Apr 2023 14:26:09 +1200 Subject: [PATCH] Replace "assistant" role with "you" when sumbitting to memory agent. --- autogpt/memory_management/summary_memory.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/autogpt/memory_management/summary_memory.py b/autogpt/memory_management/summary_memory.py index 3dcc4885d8..4cb6567428 100644 --- a/autogpt/memory_management/summary_memory.py +++ b/autogpt/memory_management/summary_memory.py @@ -62,6 +62,11 @@ def update_running_summary(new_events: List[Dict]) -> str: global current_memory + # Replace "assistant" with "you". This produces much better first person past tense results. + for event in new_events: + if event["role"] == "assistant": + event["role"] = "you" + prompt = f'''Your task is to create a concise running summary of actions in the provided text, focusing on key and potentially important information to remember. You will receive the current summary and the latest development. Combine them, adding relevant key information from the latest development in 1st person past tense and keeping the summary concise.