anylang
Version:
A translator's kit that uses the free APIs of Google Translate, Yandex, Bing, ChatGPT, and other LLMs
27 lines (26 loc) • 556 B
TypeScript
interface Options {
tokenStart?: string;
tokenEnd?: string;
tokenClose?: string;
}
interface TextContainer {
id: string;
text: string;
}
/**
* Util for pack multiple requests to one
*
* It's just encode/decode all texts with custom separation options
*/
export declare class Multiplexor {
private readonly options;
constructor(options?: Options);
encode(data: TextContainer[]): string;
decode(text: string): {
id: string;
text: string;
}[];
private escape;
private unescape;
}
export {};