Skip to content

Commit

Permalink
fix: fine-tune the prompt to eliminate unnecessary symbols in the tra…
Browse files Browse the repository at this point in the history
…nslation result
  • Loading branch information
yetone committed Mar 2, 2023
1 parent 7625a4d commit 8805361
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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" ||
Expand Down

0 comments on commit 8805361

Please sign in to comment.