mirror of
https://github.com/christianvidalwolf-prog/Craze-Data-check.git
synced 2026-08-03 13:55:23 +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}`;
|
||||
} else if (field === 'longEn') {
|
||||
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 {
|
||||
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: {
|
||||
maxOutputTokens: 1000,
|
||||
temperature: 0.7
|
||||
maxOutputTokens: 2048,
|
||||
temperature: 0.2
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user