i18n-ai-translate
Version:
Use LLMs to translate your i18n JSON to any language.
18 lines (17 loc) • 644 B
TypeScript
import ChatInterface from "./chat_interface";
import type { ChatRequest, Ollama as InternalOllama, Message } from "ollama";
import type { ZodType, ZodTypeDef } from "zod";
export default class Ollama extends ChatInterface {
model: InternalOllama;
chatParams: (ChatRequest & {
stream: false;
}) | null;
history: Message[];
constructor(model: InternalOllama);
startChat(params: ChatRequest): void;
sendMessage(message: string, format?: ZodType<any, ZodTypeDef, any>): Promise<string>;
resetChatHistory(): void;
rollbackLastMessage(): void;
invalidTranslation(): void;
invalidStyling(): void;
}