32 lines
527 B
TypeScript
32 lines
527 B
TypeScript
export interface Language {
|
|
code: string;
|
|
name: string;
|
|
nativeName?: string;
|
|
}
|
|
|
|
export interface TranslationRequest {
|
|
text: string;
|
|
source: string;
|
|
target: string;
|
|
}
|
|
|
|
export interface TranslationResponse {
|
|
translatedText: string;
|
|
source: string;
|
|
target: string;
|
|
originalText: string;
|
|
}
|
|
|
|
export interface OllamaTranslateRequest {
|
|
model: string;
|
|
prompt: string;
|
|
stream: boolean;
|
|
}
|
|
|
|
export interface OllamaTranslateResponse {
|
|
model: string;
|
|
created_at: string;
|
|
response: string;
|
|
done: boolean;
|
|
}
|