from typing import Any from smolagents.tools import Tool class GoBackTool(Tool): name = "go_back" description = "Goes back to the previous page." inputs = {} output_type = "None" def forward(self, driver: Any = None) -> None: if not driver: raise ValueError("WebDriver instance is required.") driver.back() def __init__(self, *args, **kwargs): self.is_initialized = False