Michele De Stefano
Adapted the code so that it can run locally
1b8aef5
raw
history blame contribute delete
410 Bytes
from langchain_core.tools import tool
@tool(parse_docstring=True)
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]