diff --git a/backend/agent/gemini_prompt.py b/backend/agent/gemini_prompt.py index b1bbfb25..fea73c8e 100644 --- a/backend/agent/gemini_prompt.py +++ b/backend/agent/gemini_prompt.py @@ -15,8 +15,8 @@ You are a full-spectrum autonomous agent capable of executing complex tasks acro - All file operations (create, read, write, delete) expect paths relative to "/workspace" ## 2.2 SYSTEM INFORMATION - BASE ENVIRONMENT: Python 3.11 with Debian Linux (slim) -- UTC DATE: {datetime.datetime.now(datetime.timezone.utc).strftime('%Y-%m-%d')} -- UTC TIME: {datetime.datetime.now(datetime.timezone.utc).strftime('%H:%M:%S')} +- UTC DATE: {{current_date}} +- UTC TIME: {{current_time}} - CURRENT YEAR: 2025 - TIME CONTEXT: When searching for latest news or time-sensitive information, ALWAYS use these current date/time values as reference points. Never use outdated information or assume different dates. - INSTALLED TOOLS: @@ -1581,7 +1581,10 @@ Is there anything specific you'd like me to adjust or explain in more detail abo def get_gemini_system_prompt(): - return SYSTEM_PROMPT + EXAMPLE + return SYSTEM_PROMPT.format( + current_date=datetime.datetime.now(datetime.timezone.utc).strftime('%Y-%m-%d'), + current_time=datetime.datetime.now(datetime.timezone.utc).strftime('%H:%M:%S') + ) + EXAMPLE # if __name__ == "__main__": diff --git a/backend/agent/prompt.py b/backend/agent/prompt.py index 792b42f6..8ad3c4eb 100644 --- a/backend/agent/prompt.py +++ b/backend/agent/prompt.py @@ -15,8 +15,8 @@ You are a full-spectrum autonomous agent capable of executing complex tasks acro - All file operations (create, read, write, delete) expect paths relative to "/workspace" ## 2.2 SYSTEM INFORMATION - BASE ENVIRONMENT: Python 3.11 with Debian Linux (slim) -- UTC DATE: {datetime.datetime.now(datetime.timezone.utc).strftime('%Y-%m-%d')} -- UTC TIME: {datetime.datetime.now(datetime.timezone.utc).strftime('%H:%M:%S')} +- UTC DATE: {{current_date}} +- UTC TIME: {{current_time}} - CURRENT YEAR: 2025 - TIME CONTEXT: When searching for latest news or time-sensitive information, ALWAYS use these current date/time values as reference points. Never use outdated information or assume different dates. - INSTALLED TOOLS: @@ -599,4 +599,7 @@ def get_system_prompt(): ''' Returns the system prompt ''' - return SYSTEM_PROMPT \ No newline at end of file + return SYSTEM_PROMPT.format( + current_date=datetime.datetime.now(datetime.timezone.utc).strftime('%Y-%m-%d'), + current_time=datetime.datetime.now(datetime.timezone.utc).strftime('%H:%M:%S') + ) \ No newline at end of file