SOPHOS / sophos_tools.py
AGofficial's picture
Upload 6 files
4863507 verified
raw
history blame contribute delete
402 Bytes
import datetime
def function_tool(func):
func._is_tool = True
return func
@function_tool
def get_weather(city: str) -> str:
'''fetches weather information for a given city.'''
return f"The weather in {city} is sunny with 75°F"
@function_tool
def get_time() -> str:
'''fetches the current time.'''
return f"The current time is {datetime.datetime.now().strftime('%H:%M:%S')}"