from smolagents import Tool from typing import Any, Optional class SimpleTool(Tool): name = "suggest_menu" description = "Suggest a South Indian menu based on the occasion." inputs = {'occasion': {'type': 'string', 'description': 'The type of occasion. Options: "casual", "formal", "festival", "wedding", or "custom".'}} output_type = "string" def forward(self, occasion: str) -> str: """ Suggest a South Indian menu based on the occasion. Args: occasion (str): The type of occasion. Options: "casual", "formal", "festival", "wedding", or "custom". """ occasion = occasion.lower() if occasion == "casual": return ( "Breakfast: Idli, Vada, and Coconut Chutney.\n" "Lunch: Curd Rice, Lemon Rice, and Papad.\n" "Dinner: Dosa with Sambar and Tomato Chutney." ) elif occasion == "formal": return ( "Welcome Drink: Tender Coconut Water.\n" "Lunch: Veg Meals with Sambar, Rasam, Poriyal, Avial, Appalam, and Payasam.\n" "Dessert: Kesari Bath and Filter Coffee." ) elif occasion == "festival": return ( "Festival Feast: Pulihora, Garelu, Payasam, Poori Curry, and Banana Leaf Meals with Ghee.\n" "Dessert: Boorelu and Sweet Pongal." ) elif occasion == "wedding": return ( "Wedding Feast: Banana Leaf Meals with Rice, Sambar, Rasam, Curry, Papad, Pickle, Curd, and Ice Cream.\n" "Specials: Paneer Butter Masala, Biryani, and Gulab Jamun." ) else: return "Customized South Indian menu — please specify the occasion."