File size: 866 Bytes
5d7e1ed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"""

TIME INFORMATION UTILITY

========================



Returns a short, readable string with the current date and time. This is

injected into the system prompt so the LLM can answer "what day is it?"

and similar questions. Called by both GroqService and RealtimeGroqService.

"""

import datetime

def get_time_information() -> str:
    """Return a few lines of text: day name, date, month, year, and time (24h)."""
    now = datetime.datetime.now()
    return (
        f"Current Real-time Information:\n"
        f"Day: {now.strftime('%A')}\n"      # e.g. Monday
        f"Date: {now.strftime('%d')}\n"     # e.g. 05
        f"Month: {now.strftime('%B')}\n"    # e.g. February
        f"Year: {now.strftime('%Y')}\n"     # e.g. 2026
        f"Time: {now.strftime('%H')} hours, {now.strftime('%M')} minutes, {now.strftime('%S')} seconds\n"
    )