Spaces:
Build error
Build error
| from typing import Any, Optional | |
| from smolagents.tools import Tool | |
| class PizzaPartyThemeTool(Tool): | |
| name = "pizza_party_theme_generator" | |
| description = """ | |
| This tool suggests creative pizza-themed party ideas based on a category. | |
| It returns a unique party theme idea.""" | |
| inputs = {'category': {'type': 'string', 'description': "The type of pizza party (e.g., 'cheese', 'pepperoni','combination')."}} | |
| output_type = "string" | |
| def forward(self, category: str): | |
| themes = { | |
| "cheese": "Super Cheezy: Guests come dressed as their favorite type of cheese", | |
| "pepperoni": "Pepperoni Ball: A mysterious masquerade where guests dress as pepperoni, sausage, or salami.", | |
| "combination": "Combination Night: Guests dress as freely as they wish, combining all their ingredients." | |
| } | |
| return themes.get(category.lower(), "Themed party idea not found. Try 'cheese', 'pepperoni', or 'combination'.") | |
| def __init__(self, *args, **kwargs): | |
| self.is_initialized = False | |