From 88053618a09ad463f3afb7aebc6efc1a3c481040 Mon Sep 17 00:00:00 2001 From: yetone Date: Thu, 2 Mar 2023 18:12:44 +0800 Subject: [PATCH] fix: fine-tune the prompt to eliminate unnecessary symbols in the translation result --- src/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.js b/src/main.js index 82eacdb..ae7749c 100644 --- a/src/main.js +++ b/src/main.js @@ -14,10 +14,10 @@ function translate(query, completion) { }; let prompt = `translate from ${lang.langMap.get(query.detectFrom) || query.detectFrom } to ${lang.langMap.get(query.detectTo) || query.detectTo}:\n\n"${query.text - }"=>`; + }" =>`; if (query.detectTo === "wyw" || query.detectTo === "yue") { prompt = `请翻译成${lang.langMap.get(query.detectTo) || query.detectTo - }:\n\n"${query.text}"=>`; + }:\n\n"${query.text}" =>`; } if ( query.detectFrom === "wyw" ||