mirror of
https://github.com/christianvidalwolf-prog/Craze-Data-check.git
synced 2026-08-03 14:55:24 +02:00
fix(translate): increase token limit and improve prompt for full translation (no summarizing)
This commit is contained in:
@@ -46,7 +46,15 @@ export function EditPanel({ row, rowIndex, onSave, onClose }: EditPanelProps) {
|
|||||||
prompt = `Based on the following product details, generate a long commercial description in German. It should be fluent, oriented towards B2B toy buyers, 3-5 paragraphs long. Include features, benefits, and material if available.\n\n${baseContext}`;
|
prompt = `Based on the following product details, generate a long commercial description in German. It should be fluent, oriented towards B2B toy buyers, 3-5 paragraphs long. Include features, benefits, and material if available.\n\n${baseContext}`;
|
||||||
} else if (field === 'longEn') {
|
} else if (field === 'longEn') {
|
||||||
if (formData.longDe) {
|
if (formData.longDe) {
|
||||||
prompt = `Translate exactly this German product description into professional English for the toy market. Ensure a natural flow and high-quality vocabulary:\n\n${formData.longDe}`;
|
prompt = `Translate the EVERYTHING below from German into professional English.
|
||||||
|
CRITICAL INSTRUCTIONS:
|
||||||
|
1. Do NOT summarize.
|
||||||
|
2. Maintain the EXACT same length and detailed information.
|
||||||
|
3. Keep all technical specs intact.
|
||||||
|
4. Translate every single paragraph.
|
||||||
|
|
||||||
|
German Text to Translate:
|
||||||
|
${formData.longDe}`;
|
||||||
} else {
|
} else {
|
||||||
prompt = `Based on the following product details, generate a long commercial description in English. It should be fluent, oriented towards B2B toy buyers, 3-5 paragraphs long.\n\n${baseContext}`;
|
prompt = `Based on the following product details, generate a long commercial description in English. It should be fluent, oriented towards B2B toy buyers, 3-5 paragraphs long.\n\n${baseContext}`;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ export async function generateGemini(prompt: string, systemPrompt: string): Prom
|
|||||||
}]
|
}]
|
||||||
}],
|
}],
|
||||||
generationConfig: {
|
generationConfig: {
|
||||||
maxOutputTokens: 1000,
|
maxOutputTokens: 2048,
|
||||||
temperature: 0.7
|
temperature: 0.2
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user