Fix issue where cache misses occur when translateBeforeHTMLFormatting is disabled.

This commit is contained in:
Bo26fhmC5M
2024-11-30 08:53:55 +09:00
parent 5ebb934d3b
commit daa9ed79c8

View File

@@ -140,11 +140,12 @@
translateText = false
try {
if(DBState.db.autoTranslate){
if(DBState.db.autoTranslateCachedOnly && DBState.db.translatorType === "llm"){
const cache = await getLLMCache(data)
if(cache !== null){
translateText = true
}
if(DBState.db.autoTranslateCachedOnly && DBState.db.translatorType === 'llm'){
const cache = DBState.db.translateBeforeHTMLFormatting
? await getLLMCache(data)
: await getLLMCache(await ParseMarkdown(data, charArg, 'pretranslate', chatID, getCbsCondition()))
translateText = cache !== null
}
else{
translateText = true