File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -20,11 +20,13 @@ def datetime_to_timestamp(dt):
2020
2121def get_local_time_fast (timezone ):
2222 # Get current UTC time and convert to the specified timezone
23+ # Only return the date to avoid cache busting on every request
2324 if not timezone :
24- return datetime .now ().strftime ("%Y-%m-%d %I:%M:%S %p %Z%z " )
25+ return datetime .now ().strftime ("%B %d, %Y " )
2526 current_time_utc = datetime .now (pytz .utc )
2627 local_time = current_time_utc .astimezone (pytz .timezone (timezone ))
27- formatted_time = local_time .strftime ("%Y-%m-%d %I:%M:%S %p %Z%z" )
28+ # Return only the date in a human-readable format (e.g., "June 1, 2021")
29+ formatted_time = local_time .strftime ("%B %d, %Y" )
2830
2931 return formatted_time
3032
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ def compile_memory_metadata_block(
5252 # Create a metadata block of info so the agent knows about the metadata of out-of-context memories
5353 metadata_lines = [
5454 "<memory_metadata>" ,
55- f"- The current time is: { get_local_time_fast (timezone )} " ,
55+ f"- The current system date is: { get_local_time_fast (timezone )} " ,
5656 f"- Memory blocks were last modified: { timestamp_str } " ,
5757 f"- { previous_message_count } previous messages between you and the user are stored in recall memory (use tools to access them)" ,
5858 ]
You can’t perform that action at this time.
0 commit comments