CoolFace
Apppublic

Perfect7613/codingpartyagent

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
suggest_menu.py23 linesDownload Raw Back to tools
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 coding day."}}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: The type of occasion for the coding day.15        """16        if occasion == "vibe":17            return "Pizza, snacks, and drinks."18        elif occasion == "bit stressed":19            return "some normal food."20        elif occasion == "deadline":21            return "Buffet with high-energy and healthy food."22        else:23            return "Custom menu for the butler."