Added time and date to the system message for each context

pull/548/head
Ryan Peach 2023-04-08 22:59:28 -04:00
parent 1ea9c36571
commit 47c6117e18
1 changed files with 5 additions and 2 deletions

View File

@ -26,7 +26,10 @@ def create_chat_message(role, content):
def generate_context(prompt, relevant_memory, full_message_history, model):
current_context = [
create_chat_message(
"system", prompt), create_chat_message(
"system", prompt),
create_chat_message(
"system", f"The current time and date is {time.strftime('%c')}"),
create_chat_message(
"system", f"Permanent memory: {relevant_memory}")]
# Add messages from the full message history until we reach the token limit