UNPKG

@juspay/neurolink

Version:

The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002

28 lines (27 loc) • 831 B
/** * Recursive Chunker * * Recursively splits text using an ordered list of separators. * Tries each separator in order until chunks are small enough. */ import type { Chunk, ChunkerConfig, ChunkingStrategy } from "../../types/index.js"; import { BaseChunker } from "./BaseChunker.js"; /** * Recursive Chunker * * Splits content using ordered separators, recursively breaking * down text until chunks meet size requirements. */ export declare class RecursiveChunker extends BaseChunker { readonly strategy: ChunkingStrategy; getDefaultConfig(): ChunkerConfig; protected doChunk(content: string, config: ChunkerConfig): Promise<Chunk[]>; /** * Recursively split text using separators */ private recursiveSplit; /** * Apply overlap between chunks */ private applyOverlap; }