Spaces:
Runtime error
Runtime error
Download tools/reverse_string.py from AlbertoFor/Final_Assignment_Template: direct link, hf CLI and curl.
- Browser
- Download file 356 Bytes
-
https://huggingface.co/spaces/AlbertoFor/Final_Assignment_Template/resolve/731825e16c4cd2e64bf4589716210c905b2a032a/tools/reverse_string.py
- Command line
-
hf download hf://spaces/AlbertoFor/Final_Assignment_Template@731825e16c4cd2e64bf4589716210c905b2a032a/tools/reverse_string.py
-
curl -L -o reverse_string.py https://huggingface.co/spaces/AlbertoFor/Final_Assignment_Template/resolve/731825e16c4cd2e64bf4589716210c905b2a032a/tools/reverse_string.py
356 Bytes
| from langchain_core.tools.base import BaseTool | |
| class ReverseString(BaseTool): | |
| name: str = "reverse_string_tool" | |
| description: str = ("This tool inverts the order of the characters within a sentence. It is particularly useful if you can't understand the content in any language.") | |
| def _run(self, string: str) -> str: | |
| return string[::-1] |