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/c657a718d3bbd7a1d64e9e18af305801f8fb5852/tools/reverse_string.py
- Command line
-
hf download hf://spaces/AlbertoFor/Final_Assignment_Template@c657a718d3bbd7a1d64e9e18af305801f8fb5852/tools/reverse_string.py
-
curl -L -o reverse_string.py https://huggingface.co/spaces/AlbertoFor/Final_Assignment_Template/resolve/c657a718d3bbd7a1d64e9e18af305801f8fb5852/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] |