File size: 1,237 Bytes
eb30b6c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from typing import Any, Optional
from smolagents.tools import Tool

class SuperheroPartyThemeToolNew(Tool):
    name = "super_hero_party_generator"
    description = """This tools helps in generating super hero party ideas based on the categories
                    It gives out a unique party theme idea.
                 """
    inputs = {'category': {'type': 'string', 'description': "The type of superhero party (e.g., 'classic heroes', 'villain masquerade', 'futuristic Gotham')."}}
    output_type = "string"

    def forward(self, category: str):
        themes= {
            "classic heroes": "Justice League Gala: Guests come dressed as their favorite DC heroes with themed cocktails like 'The Kryptonite Punch'.",
            "villain masquerade": "Gotham Rogues' Ball: A mysterious masquerade where guests dress as classic Batman villains.",
            "futuristic Gotham": "Neo-Gotham Night: A cyberpunk-style party inspired by Batman Beyond, with neon decorations and futuristic gadgets."
        }
        return themes.get(category.lower(), "Themed party idea not found. Try 'classic heroes', 'villain masquerade', or 'futuristic Gotham'.")

    def __init__(self, *args, **kwargs):
        self.is_initialized = False