RoboServant/textgen/tool_funcs.py
2025-09-30 12:01:44 -05:00

13 lines
331 B
Python

from . import weather
wapi = weather.OpenMeteo() # Weather API
def get_high_low() -> str:
weather_dataframe = wapi.get_weather()
high = round(weather_dataframe.max(axis=0)['temperature_2m'])
low = round(weather_dataframe.min(axis=0)['temperature_2m'])
return f'The high today is {high}, and the low is {low}.'