Skip to content

Commit

Permalink
feat: add polish and grammar checking
Browse files Browse the repository at this point in the history
  • Loading branch information
yetone committed Mar 3, 2023
1 parent 196c85e commit cb0cbf9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ function translate(query, completion) {
prompt = "请翻译成粤语白话文";
}
}
if (query.detectFrom === query.detectTo) {
if (query.detectTo === "zh-Hant" || query.detectTo === "zh-Hans") {
prompt = "请润色一下这句话";
} else {
prompt = "please polish this sentence";
}
}
const body = {
model: $option.model,
temperature: 0,
Expand Down

0 comments on commit cb0cbf9

Please sign in to comment.