Toggle Menu
Prev Up Next

# `langchain_community.utilities.redis`.TokenEscaper

class langchain_community.utilities.redis.TokenEscaper(escape_chars_re: Optional[Pattern] = None)

  Escape punctuation within an input string.

  Attributes

  `DEFAULT_ESCAPED_CHARS` |

  Methods

  `__init__`([escape_chars_re]) |
  `escape`(value) |

  Parameters

    escape_chars_re (Optional[Pattern]) –

  __init__(escape_chars_re: Optional[Pattern] = None)
    Parameters

      escape_chars_re (Optional[Pattern]) –

  escape(value: str) → str
    Parameters

      value (str) –

    Return type

      str