Spaces:
Sleeping
Sleeping
File size: 1,308 Bytes
60e03c1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
from smolagents import Tool
from typing import Any, Optional
class SimpleTool(Tool):
name = "ambiance_setting"
description = "Suggests an appropriate ambiance setting based on the event type."
inputs = {"event_type":{"type":"string","description":"The type of my event (e.g., 'formal dinner', 'casual gathering', 'superhero party')."}}
output_type = "string"
def forward(self, event_type: str) -> str:
"""
Suggests an appropriate ambiance setting based on the event type.
Args:
event_type: The type of my event (e.g., 'formal dinner', 'casual gathering', 'superhero party').
Returns:
A string describing the ambiance setting.
"""
settings = {
"formal dinner": "Dim lighting with elegant chandeliers, classical music, and white tablecloths with fine china.",
"casual gathering": "Bright, warm lighting, pop or jazz music, and comfortable seating arrangements.",
"superhero party": "Themed lighting with colors associated with different superheroes, superhero movie soundtracks, and dynamic decorations like capes and masks."
}
return settings.get(event_type.lower(), "Ambiance setting not found. Try 'formal dinner', 'casual gathering', or 'superhero party'.") |