get-weather / tool.py
m-ric's picture
m-ric HF staff
Upload tool
fd6790e verified
raw
history blame
333 Bytes
from agents import Tool
class GetCurrentTime(Tool):
name = "get_current_time"
description = "Gets the current time."
inputs = {}
output_type = "string"
def forward(self) -> str:
"""
Gets the current time.
"""
from datetime import datetime
return datetime.now().strftime()