mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-18 22:44:21 +01:00
Added time and date to the system message for each context
This commit is contained in:
@@ -26,7 +26,10 @@ def create_chat_message(role, content):
|
|||||||
def generate_context(prompt, relevant_memory, full_message_history, model):
|
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"The current time and date is {time.strftime('%c')}"),
|
||||||
|
create_chat_message(
|
||||||
"system", f"Permanent memory: {relevant_memory}")]
|
"system", f"Permanent memory: {relevant_memory}")]
|
||||||
|
|
||||||
# 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
|
||||||
|
|||||||
Reference in New Issue
Block a user