React Native RAG - v0.2.0
    Preparing search index...

    Class RecursiveCharacterTextSplitter

    A text splitter that attempts to preserve semantic boundaries by recursively trying different separators. This is a wrapper around Langchain's RecursiveCharacterTextSplitter.

    Implements

    Index

    Constructors

    Methods

    Constructors

    • Creates an instance of RecursiveCharacterTextSplitter.

      Parameters

      • params: TextSplitterParams

        Parameters for the text splitter.

        • chunkSize

          The maximum size of each text chunk.

        • chunkOverlap

          The amount of overlap between consecutive text chunks.

      Returns RecursiveCharacterTextSplitter

    Methods

    • Splits the given text into chunks using a recursive character splitting strategy.

      Parameters

      • text: string

        The input text to be split.

      Returns Promise<string[]>

      A promise that resolves to an array of string chunks.