SouthIndianPartyAgent / tools /catering_service_tool.py
mohantvj's picture
Upload agent
c21aa92 verified
raw
history blame contribute delete
779 Bytes
from smolagents import Tool
from typing import Any, Optional
class SimpleTool(Tool):
name = "catering_service_tool"
description = "Find a top-rated South Indian catering service."
inputs = {'query': {'type': 'string', 'description': 'A keyword or city name.'}}
output_type = "string"
def forward(self, query: str) -> str:
"""
Find a top-rated South Indian catering service.
Args:
query (str): A keyword or city name.
"""
services = {
"Annapurna Caterers, Chennai": 4.9,
"Balaji Foods, Hyderabad": 4.8,
"Udupi Home Catering, Bangalore": 4.7,
}
best_service = max(services, key=services.get)
return f"Recommended catering service: {best_service}"