dadeumi
Version:
Dadeumi - An AI-powered literary translation workflow inspired by the Korean method of iterative textile refinement
49 lines (48 loc) • 1.15 kB
TypeScript
/**
* Core type definitions for Dadeumi translation workflow
*/
/**
* Represents a message in the AI conversation
*/
export interface ConversationMessage {
role: "system" | "user" | "assistant";
content: string;
}
/**
* Configuration for the translation process
*/
export interface TranslationConfig {
sourceLanguage?: string;
targetLanguage: string;
sourceText: string;
outputDir: string;
modelName: string;
verbose: boolean;
maxRetries: number;
retryDelay: number;
skipExternalReview: boolean;
customInstructions?: string;
reasoningEffort: "low" | "medium" | "high";
maxOutputTokens: number;
originalFilename: string;
originalExtension: string;
inputPath: string;
}
/**
* Metrics calculated for source and translated text
*/
export interface TranslationMetrics {
sourceWordCount: number;
targetWordCount: number;
sourceCharCount: number;
targetCharCount: number;
ratio: number;
estimatedReadingTime: number;
}
/**
* Model pricing information
*/
export interface ModelPricing {
inputCostPerMillion: number;
outputCostPerMillion: number;
}