/** * @file The transliteration mode: renders US and French seed addresses into five non-Latin scripts. * * Each batch holds seed rows and their target script. The model answers one JSONL line per seed, keyed by the * seed's index in the batch, and each line is checked against the surface-form invariant before it is written. */ import { type TranslitBatch } from "#recipes/deepseek/batches"; import type { DeepSeekCompleter } from "#recipes/deepseek/client"; import { type DeepSeekSink, type DeepSeekWorker, type Tally } from "#recipes/deepseek/run"; /** * The request settings both modes take from the command line. */ export interface DeepSeekRequestOptions { model: string; maxTokens: number; batchSize: number; concurrency: number; log?: (line: string) => void; } /** * The transliteration mode's own options. */ export interface TranslitOptions extends DeepSeekRequestOptions { seedPaths: readonly string[]; limit: number; /** * The script slugs to render, or every script when null or empty. */ scripts: readonly string[] | null; } /** * Python's `int(value)` for a JSON value, or null where `int` raises `TypeError` or `ValueError`. * * A number truncates toward zero and a boolean is 0 or 1. * A string may hold surrounding whitespace, a sign, and underscores between digits, * and its digits are any decimal digits. * * Node's Unicode tables are newer than CPython 3.12's, so a decimal digit assigned * after Unicode 15.0 is read here and refused by Python. */ export declare function pythonInt(value: unknown): number | null; /** * The finish reason as Python's `str()` wrote it into the tally key. */ export declare function finishKey(finish: unknown): string; /** * The worker for one transliteration batch. * * A failed request and a truncated completion each leave the batch pending, * so the next run asks for it again. */ export declare function translitWorker(client: DeepSeekCompleter, options: DeepSeekRequestOptions, sink: DeepSeekSink): DeepSeekWorker; /** * Generates every planned transliteration batch the checkpoint doesn't already hold. */ export declare function emitTransliteration(options: TranslitOptions, client: DeepSeekCompleter, sink: DeepSeekSink, checkpointPath: string): Promise; //# sourceMappingURL=transliteration.d.ts.map