File size: 344 Bytes
2364c68
 
 
 
 
 
 
 
 
 
 
 
 
bcb1c6b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from llama_index.core.tools import FunctionTool


def reverse_text(text: str) -> str:
    """It returns the reversed string of text in the input."""
    return text[::-1]


reverse_text_tool = FunctionTool.from_defaults(
    reverse_text,
    name="reverse_text_tool",
    description="It returns the reversed string of text in the input.",
)