Skip to main content

portia.open_source_tools.weather

Tool to get the weather from openweathermap.

WeatherToolSchema Objects

class WeatherToolSchema(BaseModel)

Input for WeatherTool.

WeatherTool Objects

class WeatherTool(Tool[str])

Get the weather for a given city.

run

def run(_: ToolRunContext, city: str) -> str

Run the WeatherTool.

arun

async def arun(_: ToolRunContext, city: str) -> str

Run the WeatherTool asynchronously.