anylang
Version:
A translator's kit that uses the free APIs of Google Translate, Yandex, Bing, ChatGPT, and other LLMs
24 lines (23 loc) • 731 B
TypeScript
import { z } from 'zod';
import { LLMFetcher } from '..';
export declare const GeminiLLMResponseSchema: z.ZodObject<{
candidates: z.ZodArray<z.ZodObject<{
content: z.ZodObject<{
parts: z.ZodArray<z.ZodObject<{
text: z.ZodString;
}, z.core.$strip>>;
}, z.core.$strip>;
}, z.core.$strip>>;
}, z.core.$strip>;
export declare class GeminiLLMFetcher implements LLMFetcher {
private readonly url;
private readonly config;
constructor({ apiKey, model, apiOrigin, }: {
apiKey: string;
model?: string;
apiOrigin?: string;
});
getLengthLimit(): number;
getRequestsTimeout(): number;
fetch(prompt: string): Promise<string>;
}