mirror of https://github.com/kortix-ai/suna.git
Dynamic time in system prompt
This commit is contained in:
parent
416e28f408
commit
cf6b8f19a8
|
@ -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"
|
- All file operations (create, read, write, delete) expect paths relative to "/workspace"
|
||||||
## 2.2 SYSTEM INFORMATION
|
## 2.2 SYSTEM INFORMATION
|
||||||
- BASE ENVIRONMENT: Python 3.11 with Debian Linux (slim)
|
- BASE ENVIRONMENT: Python 3.11 with Debian Linux (slim)
|
||||||
- UTC DATE: {datetime.datetime.now(datetime.timezone.utc).strftime('%Y-%m-%d')}
|
- UTC DATE: {{current_date}}
|
||||||
- UTC TIME: {datetime.datetime.now(datetime.timezone.utc).strftime('%H:%M:%S')}
|
- UTC TIME: {{current_time}}
|
||||||
- CURRENT YEAR: 2025
|
- 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.
|
- 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:
|
- 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():
|
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__":
|
# if __name__ == "__main__":
|
||||||
|
|
|
@ -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"
|
- All file operations (create, read, write, delete) expect paths relative to "/workspace"
|
||||||
## 2.2 SYSTEM INFORMATION
|
## 2.2 SYSTEM INFORMATION
|
||||||
- BASE ENVIRONMENT: Python 3.11 with Debian Linux (slim)
|
- BASE ENVIRONMENT: Python 3.11 with Debian Linux (slim)
|
||||||
- UTC DATE: {datetime.datetime.now(datetime.timezone.utc).strftime('%Y-%m-%d')}
|
- UTC DATE: {{current_date}}
|
||||||
- UTC TIME: {datetime.datetime.now(datetime.timezone.utc).strftime('%H:%M:%S')}
|
- UTC TIME: {{current_time}}
|
||||||
- CURRENT YEAR: 2025
|
- 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.
|
- 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:
|
- INSTALLED TOOLS:
|
||||||
|
@ -599,4 +599,7 @@ def get_system_prompt():
|
||||||
'''
|
'''
|
||||||
Returns the system prompt
|
Returns the system prompt
|
||||||
'''
|
'''
|
||||||
return SYSTEM_PROMPT
|
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')
|
||||||
|
)
|
Loading…
Reference in New Issue