def METHOD_NAME(self) -> Dict[str, Any]:
    """To OpenAI function."""
    if self.fn_schema is None:
        parameters = {
            "properties": {
                "input": {"title": "input query string", "type": "string"},
            },
            "required": ["input"],
            "type": "object",
        }
    else:
        parameters = self.fn_schema.schema()
    return {
        "name": self.name,
        "description": self.description,
        "parameters": parameters,
    }