feat: Update translation models and enhance order status handling in OrdersTab with new 'picked_up' status and corresponding translations across multiple locales
This commit is contained in:
@@ -55,7 +55,7 @@ const LEGAL_FILES = [
|
||||
|
||||
// Model configuration
|
||||
const GERMAN_TO_ENGLISH_MODEL = 'gpt-5.4'; // High-quality model for German -> English (critical step)
|
||||
const ENGLISH_TO_OTHER_MODEL = 'gpt-4.1-mini'; // Faster/cheaper model for English -> Other languages
|
||||
const ENGLISH_TO_OTHER_MODEL = 'gpt-5.4-mini'; // Faster/cheaper model for English -> Other languages
|
||||
|
||||
// Supported languages for translation
|
||||
const TARGET_LANGUAGES = {
|
||||
@@ -379,7 +379,7 @@ async function translateContent(content, systemPrompt, targetLanguage = null, mo
|
||||
}
|
||||
|
||||
// Function to translate English to other languages (optimized for caching)
|
||||
async function translateToTargetLanguage(englishContent, targetLanguage, model = 'gpt-4.1-mini', isLegalFile = false) {
|
||||
async function translateToTargetLanguage(englishContent, targetLanguage, model = 'gpt-5.4-mini', isLegalFile = false) {
|
||||
try {
|
||||
// Choose appropriate system prompt based on file type
|
||||
const promptTemplate = isLegalFile
|
||||
@@ -396,9 +396,7 @@ async function translateToTargetLanguage(englishContent, targetLanguage, model =
|
||||
messages: [
|
||||
{ role: 'system', content: systemPrompt },
|
||||
{ role: 'user', content: `Please translate to ${targetLanguage}` }
|
||||
],
|
||||
temperature: 0.1,
|
||||
max_tokens: 4000
|
||||
]
|
||||
});
|
||||
|
||||
return response.choices[0].message.content;
|
||||
|
||||
Reference in New Issue
Block a user