chonkie
Version:
🦛 CHONK your texts in TS with Chonkie!✨The no-nonsense lightweight and efficient chunking library.
16 lines (15 loc) • 569 B
TypeScript
/** Slumber chunker client for Chonkie API. */
import { CloudClient, ChunkerInput } from "./base";
import { Chunk } from "../types/base";
export interface SlumberChunkerConfig {
tokenizerOrTokenCounter?: string;
chunkSize?: number;
candidateSize?: number;
minCharactersPerChunk?: number;
}
export declare class SlumberChunker extends CloudClient {
private readonly config;
constructor(apiKey: string, config?: SlumberChunkerConfig);
chunk(input: ChunkerInput): Promise<Chunk[]>;
chunkBatch(inputs: ChunkerInput[]): Promise<Chunk[][]>;
}