Fix eaten newline escapes in the translate marker protocol (broke server start)
This commit is contained in:
@@ -392,9 +392,7 @@ async function handleTranslate(req,res){
|
||||
headers:{'Authorization':`Bearer ${apiKey}`,'Content-Type':'application/json','HTTP-Referer':'https://rmcircle.team','X-Title':'RM Circle Translate'},
|
||||
body:JSON.stringify({model:OPENROUTER_MODEL,max_tokens:6000,temperature:0,messages:[
|
||||
{role:'system',content:`You translate website UI strings from English to ${TR_LANG_NAMES[tl]}. The input is numbered items, each preceded by a line @@N@@. Reply with the SAME @@N@@ marker lines, each followed by that item's translation (multi-line items keep their line breaks). Output nothing except markers and translations — no preamble, no code fences. Keep these words untranslated wherever they appear: Scintilla, Ascensus, Fabrica, Culmen, Apex, Fastigium, Vertex, Corona, POL, Polygon, RM Circle, MoonPay, MetaMask, Trust Wallet. Keep numbers, #ids, emoji and punctuation intact. Natural, friendly tone.`},
|
||||
{role:'user',content:miss.map((i,j)=>`@@${j+1}@@
|
||||
${texts[i]}`).join('
|
||||
')}
|
||||
{role:'user',content:miss.map((i,j)=>`@@${j+1}@@\n${texts[i]}`).join('\n')}
|
||||
]})
|
||||
});
|
||||
clearTimeout(timer);
|
||||
|
||||
Reference in New Issue
Block a user