hackyroot/AlfredAgent1
0
1from smolagents import Tool2from typing import Any, Optional3 4class SimpleTool(Tool):5 name = "suggest_menu"6 description = "Suggests a menu based on the occasion."7 inputs = {'occasion': {'type': 'string', 'description': 'The type of occasion for the party. Allowed values are: - "casual": Menu for casual party. - "formal": Menu for formal party. - "superhero": Menu for superhero party. - "custom": Custom menu.'}}8 output_type = "string"9 10 def forward(self, occasion: str) -> str:11 """12 Suggests a menu based on the occasion.13 Args:14 occasion (str): The type of occasion for the party. Allowed values are:15 - "casual": Menu for casual party.16 - "formal": Menu for formal party.17 - "superhero": Menu for superhero party.18 - "custom": Custom menu.19 """20 if occasion == "casual":21 return "Pizza, snacks, and drinks."22 elif occasion == "formal":23 return "3-course dinner with wine and dessert."24 elif occasion == "superhero":25 return "Buffet with high-energy and healthy food."26 else:27 return "Custom menu for the butler."