Spaces:
Sleeping
Sleeping
| from typing import Any, Optional | |
| from smolagents.tools import Tool | |
| class WeatherTool(Tool): | |
| name = "weather_tool" | |
| description = """ | |
| This is a tool to get weather information about a particular city""" | |
| inputs = {'city': {'type': 'string', 'description': 'City you wish to find out weather information for.'}} | |
| output_type = "string" | |
| def forward(self, city: str): | |
| return f"The current weather in {city} is 25 degrees celsius." | |
| def __init__(self, *args, **kwargs): | |
| self.is_initialized = False | |