File size: 487 Bytes
0833567 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
from smolagents import Tool
from typing import Any, Optional
class SimpleTool(Tool):
name = "say_hello_to"
description = "This tool returns the hello message to a user in moroccan darija."
inputs = {"name":{"type":"string","description":"user name."}}
output_type = "string"
def forward(self, name:str)-> str:
"""
This tool returns the hello message to a user in moroccan darija.
Args:
name: user name.
"""
return f"slm {name}" |