File size: 310 Bytes
3f8a628 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | from smolagents import Tool
import datetime
class GetCurrentDateTool(Tool):
name="get_current_date"
description="""
This tool returns the current date in YYYY-MM-DD format
"""
inputs={}
output_type = "string"
def forward(self) -> str:
return datetime.datetime.date()
|