anylang
Version:
A translator's kit that uses the free APIs of Google Translate, Yandex, Bing, ChatGPT, and other LLMs
15 lines (14 loc) • 679 B
TypeScript
import { BaseTranslator, TranslatorOptions } from '../../BaseTranslator';
export declare class LingvaTranslate extends BaseTranslator {
static readonly translatorName = "LingvaTranslate";
static isRequiredKey: () => boolean;
static isSupportedAutoFrom: () => boolean;
static getSupportedLanguages(): string[];
private readonly apiHost;
constructor(options: TranslatorOptions);
getLengthLimit(): number;
getRequestsTimeout(): number;
checkLimitExceeding(text: string | string[]): number;
translate(text: string, from: string, to: string): Promise<string>;
translateBatch(texts: string[], from: string, to: string): Promise<string[]>;
}