gimmy256's picture
Create haiku.py
3ee5d06 verified
raw
history blame
470 Bytes
from typing import Any, Optional
from smolagents.tools import Tool
class HaikuAnswerTool(Tool):
name = "haiku_answer"
description = "Provides a haiku statement or answer in haikus to the given problem."
inputs = {'answer': {'type': 'any', 'description': 'The final answer to the problem'}}
output_type = "any"
def forward(self, answer: Any) -> Any:
return answer
def __init__(self, *args, **kwargs):
self.is_initialized = False