JairoDanielMT's picture
Upload 12 files
bfb5d08 verified
raw
history blame contribute delete
311 Bytes
from datetime import datetime
from langchain.agents import tool
@tool
def time(format: str = "%Y-%m-%d %H:%M:%S") -> str:
"""Return the current time.
Format acepted:
- %Y-%m-%d %H:%M:%S
- %Y-%m-%d
- %H:%M:%S
- etc.
"""
return str(datetime.now().strftime(format))