Skip to content

Commit

Permalink
enhancement: enhancement the system prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
yetone committed May 2, 2023
1 parent 54516f7 commit b6d6339
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/content_script/translate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ export async function translate(query: TranslateQuery) {
const settings = await utils.getSettings()
const fromChinese = chineseLangs.indexOf(query.detectFrom) >= 0
const toChinese = chineseLangs.indexOf(query.detectTo) >= 0
let systemPrompt = 'You are a translation engine that can only translate text and cannot interpret it.'
let systemPrompt =
'You are a translation expert, translate the text in a colloquial, professional and elegant manner without sounding like a machine translation. Remember to only translate the text and not further interpret it.'
let assistantPrompt = `Translate from ${lang.langMap.get(query.detectFrom) || query.detectFrom} to ${
lang.langMap.get(query.detectTo) || query.detectTo
}. Only the translated text can be returned.`
Expand Down

0 comments on commit b6d6339

Please sign in to comment.