from langchain_core.tools import tool | |
def reverse_string(s: str) -> str: | |
""" | |
Returns the reverse of a string. Use this tool when you suspect that | |
the provided prompt is written with characters in reverse order. | |
Args: | |
s: The input string. | |
Returns: | |
The output string. It is the input with character in reverse order. | |
""" | |
return s[::-1] | |