This commit is contained in:
Kwaroran
2025-03-08 19:23:26 +09:00
parent ee319a38cd
commit 5acb02db65

View File

@@ -505,7 +505,7 @@ async function translateLLM(text:string, arg:{to:string, from:string, regenerate
let formated:OpenAIChat[] = []
let prompt = db.translatorPrompt || `You are a translator. translate the following html or text into {{slot}}. do not output anything other than the translation.`
let parsedPrompt = parseChatML(prompt.replaceAll('{{slot::from}}', arg.from).replaceAll('{{slot}}', arg.to).replaceAll('{{solt::content}}', text).replaceAll('{{solt::content}}', text).replaceAll('{{slot::tnote}}', translatorNote))
let parsedPrompt = parseChatML(prompt.replaceAll('{{slot::from}}', arg.from).replaceAll('{{slot}}', arg.to).replaceAll('{{solt::content}}', text).replaceAll('{{slot::content}}', text).replaceAll('{{slot::tnote}}', translatorNote))
if(parsedPrompt){
formated = parsedPrompt
}