From 8896909e196dec584e03d55dfd3b93e76a2c84d3 Mon Sep 17 00:00:00 2001 From: Daniel Vainsencher Date: Wed, 29 May 2024 17:19:32 -0400 Subject: [PATCH] aider: Capitalize the "ASSISTANT" role when logging to the LLM history file. # Aider chat conversation: USER: When logging to llm history file, capitalize the ASSISTANT role. ASSISTANT: To capitalize the "ASSISTANT" role when logging to the LLM history file, we need to modify the `send_new_user_message` method in `aider/coders/base_coder.py`. Here is the *SEARCH/REPLACE* block: aider/coders/base_coder.py ```python <<<<<<< SEARCH with open('.aider.llm.history', 'a') as log_file: log_file.write(f"LLM RESPONSE {timestamp}\n") log_file.write(format_content("assistant", content) + "\n") ======= with open('.aider.llm.history', 'a') as log_file: log_file.write(f"LLM RESPONSE {timestamp}\n") log_file.write(format_content("ASSISTANT", content) + "\n") >>>>>>> REPLACE ``` --- aider/coders/base_coder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aider/coders/base_coder.py b/aider/coders/base_coder.py index d179bcc0d..b1616fb95 100755 --- a/aider/coders/base_coder.py +++ b/aider/coders/base_coder.py @@ -834,7 +834,7 @@ class Coder: timestamp = datetime.datetime.now().isoformat(timespec='seconds') with open('.aider.llm.history', 'a') as log_file: log_file.write(f"LLM RESPONSE {timestamp}\n") - log_file.write(format_content("assistant", content) + "\n") + log_file.write(format_content("ASSISTANT", content) + "\n") if interrupted: content += "\n^C KeyboardInterrupt"