File size: 762 Bytes
521f25e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 question Called by both GroqService and RealtimeService.
"""

import datetime

def get_time_information() -> str:
    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"
    )