Makes it clearer to the AI exactly what memories are.

This commit is contained in:
Toran Bruce Richards
2023-04-09 06:16:42 +01:00
parent b63238f40f
commit d8410d9ca3

View File

@@ -27,7 +27,7 @@ def generate_context(prompt, relevant_memory, full_message_history, model):
current_context = [ current_context = [
create_chat_message( create_chat_message(
"system", prompt), create_chat_message( "system", prompt), create_chat_message(
"system", f"Permanent memory: {relevant_memory}")] "system", f"This reminds you of these events from your past:\n{relevant_memory}\n\n")]
# Add messages from the full message history until we reach the token limit # Add messages from the full message history until we reach the token limit
next_message_to_add_index = len(full_message_history) - 1 next_message_to_add_index = len(full_message_history) - 1