Increase translation limits: 70k max_tokens and 50k content length

This commit is contained in:
Russell Ballestrini 2025-07-01 16:33:43 -04:00
parent 6e4770c07e
commit 5d0f299b39

View file

@ -40,7 +40,7 @@ async function* sendMessageWithHistory(messageHistory) {
model: getSelectedModel(),
messages: messageHistory,
temperature: 0.3, // Lower temperature for more consistent translation
max_tokens: 8192,
max_tokens: 70000,
stream: true
})
});
@ -266,7 +266,7 @@ export async function translateCurrentPage(targetLanguage) {
}
// Limit content length to avoid overwhelming the AI
const maxLength = 15000; // Increased limit for better coverage
const maxLength = 50000; // Much higher limit for complete page translation
const contentToTranslate = pageContent.length > maxLength
? pageContent.substring(0, maxLength) + '...'
: pageContent;