UNPKG

@callmedayz/ai-prompt-toolkit

Version:

Professional AI prompt engineering toolkit with advanced template features, real-time dashboards, conditional logic, template inheritance, live monitoring, OpenRouter integration, and 310+ model support

45 lines 1.3 kB
import { ChunkOptions, SupportedModel } from './types'; /** * Text chunking utility for processing large texts with AI models */ export declare class TextChunker { /** * Split text into chunks that fit within token limits */ static chunkText(text: string, options: ChunkOptions): string[]; /** * Chunk text by sentences, preserving sentence boundaries */ private static chunkBySentences; /** * Chunk text by words, preserving word boundaries */ private static chunkByWords; /** * Chunk text by characters (least precise but fastest) */ private static chunkByCharacters; /** * Split text into sentences using common sentence endings */ private static splitIntoSentences; /** * Get overlap sentences for chunking */ private static getOverlapSentences; /** * Chunk text for a specific model */ static chunkForModel(text: string, model: SupportedModel, overlapPercent?: number): string[]; /** * Get chunk statistics */ static getChunkStats(chunks: string[]): { totalChunks: number; averageTokens: number; minTokens: number; maxTokens: number; totalTokens: number; }; } //# sourceMappingURL=text-chunker.d.ts.map