File size: 717 Bytes
9433533
 
 
 
 
 
 
f5c9c80
 
 
 
 
 
 
 
 
 
9433533
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from datetime import date

from langchain_core.tools import tool


@tool
def get_current_day() -> date:
    """Get the current day to reference for any time-sensitive data requests.

    ALWAYS call this tool:
    * At the beginning of conversations involving dates or timelines
    * Before searching news or time-sensitive data
    * When interpreting or presenting any temporal information (recent, upcoming, last year, etc.)
    * Before making statements about when events occurred or will occur

    Never assume the correct date.
    If data only includes partial date information, use this tool to infer missing details.

    Returns
    -------
    date
        Today's date
    """

    return date.today()