i18n-ai-translate
Version:
AI-powered localization CLI, Node library, and GitHub Action. Translate i18next JSON, Gettext PO, Java .properties, and iOS .strings with ChatGPT, Claude, Gemini, or local Ollama models.
19 lines (18 loc) • 825 B
TypeScript
import ChatInterface from "./chat_interface";
import type { Anthropic as InternalAnthropic } from "@anthropic-ai/sdk";
import type { MessageCreateParams, MessageParam } from "@anthropic-ai/sdk/resources";
import type { ZodType, ZodTypeDef } from "zod";
import type RateLimiter from "../rate_limiter";
export default class Anthropic extends ChatInterface {
model: InternalAnthropic;
chatParams: MessageCreateParams | null;
history: MessageParam[];
rateLimiter: RateLimiter;
constructor(model: InternalAnthropic, rateLimiter: RateLimiter);
startChat(params: MessageCreateParams): void;
sendMessage(message: string, _format?: ZodType<any, ZodTypeDef, any>): Promise<string>;
resetChatHistory(): void;
rollbackLastMessage(): void;
invalidTranslation(): void;
invalidStyling(): void;
}