CoolFace
Apppublic

rmorris-code/AlfredAgent

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
superhero_party_theme_generator.py23 linesDownload Raw Back to tools
1from typing import Any, Optional2from smolagents.tools import Tool3 4class SuperheroPartyThemeTool(Tool):5    name = "superhero_party_theme_generator"6    description = """7    This tool suggests creative superhero-themed party ideas based on a category.8    It returns a unique party theme idea."""9    inputs = {'category': {'type': 'string', 'description': "The type of superhero party (e.g., 'classic heroes', 'villain masquerade', 'futuristic Gotham')."}}10    output_type = "string"11 12    def forward(self, category: str):13        themes = {14            "classic heroes": "Justice League Gala: Guests come dressed as their favorite DC heroes with themed cocktails like 'The Kryptonite Punch'.",15            "villain masquerade": "Gotham Rogues' Ball: A mysterious masquerade where guests dress as classic Batman villains.",16            "futuristic Gotham": "Neo-Gotham Night: A cyberpunk-style party inspired by Batman Beyond, with neon decorations and futuristic gadgets."17        }18 19        return themes.get(category.lower(), "Themed party idea not found. Try 'classic heroes', 'villain masquerade', or 'futuristic Gotham'.")20 21    def __init__(self, *args, **kwargs):22        self.is_initialized = False23