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

20 lines (19 loc) • 629 B
/** * Token Chunker * * Splits text by token count using a tokenizer. * Useful for precise token budget management. */ import type { Chunk, ChunkerConfig, ChunkingStrategy } from "../../types/index.js"; import { BaseChunker } from "./BaseChunker.js"; /** * Token Chunker * * Approximates token-based splitting using word count. * For production, integrate with a proper tokenizer (tiktoken, etc.) */ export declare class TokenChunker extends BaseChunker { readonly strategy: ChunkingStrategy; getDefaultConfig(): ChunkerConfig; protected doChunk(content: string, config: ChunkerConfig): Promise<Chunk[]>; }