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))