Skip to content

Commit

Permalink
allow context in (brackets) for better translations
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoFro committed Oct 16, 2024
1 parent 4e46cb8 commit 4185ae8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/getTranslation.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ async function getTranslation(nativeText) {
max_tokens: 1000,
messages: [{
role: "user",
content: `Translate the following ${process.env.NATIVE_LANGUAGE} text to ${process.env.TARGET_LANGUAGE}. Only provide the ${process.env.TARGET_LANGUAGE} translation, nothing else: "${nativeText}"`
content: `Translate the following ${process.env.NATIVE_LANGUAGE} text to ${process.env.TARGET_LANGUAGE}. Words in brackets () are for context only. Only provide the ${process.env.TARGET_LANGUAGE} translation, nothing else: "${nativeText}"`
}]
});

Expand Down

0 comments on commit 4185ae8

Please sign in to comment.