Merge branch 'master' into feature/time-and-date

This commit is contained in:
Toran Bruce Richards
2023-04-09 08:02:20 +01:00
committed by GitHub
11 changed files with 392 additions and 25 deletions

View File

@@ -30,7 +30,7 @@ def generate_context(prompt, relevant_memory, full_message_history, model):
create_chat_message(
"system", f"The current time and date is {time.strftime('%c')}"),
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
next_message_to_add_index = len(full_message_history) - 1