import { Tiktoken } from 'tiktoken/lite';
export declare const getWasmTokenizer: () => Promise<TextTokenizer>;
export declare class TextTokenizer {
    private tokenizer;
    private warnOnSlowCalls;
    constructor(tokenizer: Tiktoken);
    private wrapWithWarning;
    private splitIntoChunks;
    private truncate_reverse;
    truncate(text: string, maxTokens: number): string;
    truncateObject<T extends PropertyKey>(object: Record<T, string>, maxTokens: number, truncateOrder: T[]): Record<T, string>;
    split(text: string): string[];
    /**
     * Counts the number of tokens, up to a fixed ceiling, after which we return
     * The reason to have a ceiling is to avoid performance issues with very large texts
     */
    count(text: string, max?: number): number;
}
