wuchale
Version:
Protobuf-like i18n from normal code
29 lines • 884 B
TypeScript
import PO from 'pofile';
export type ItemType = InstanceType<typeof PO.Item>;
export default class GeminiQueue {
batches: ItemType[][];
running: Promise<void> | null;
sourceLang: string;
targetLang: string;
url: string;
instruction: string;
onComplete: () => Promise<void>;
constructor(sourceLang: string, targetLang: string, apiKey: string | null, onComplete: () => Promise<void>);
prepareData(fragments: ItemType[]): {
system_instruction: {
parts: {
text: string;
}[];
};
contents: {
parts: {
text: string;
}[];
}[];
};
translate(fragments: ItemType[]): Promise<void>;
getBatches(): Generator<ItemType[], void, unknown>;
run(): Promise<void>;
add(items: ItemType[]): boolean;
}
//# sourceMappingURL=gemini.d.ts.map