diff --git a/packages/code-review-gpt/src/review/prompt/constructPrompt/constructPrompt.ts b/packages/code-review-gpt/src/review/prompt/constructPrompt/constructPrompt.ts index 0e70f93..6854ad5 100644 --- a/packages/code-review-gpt/src/review/prompt/constructPrompt/constructPrompt.ts +++ b/packages/code-review-gpt/src/review/prompt/constructPrompt/constructPrompt.ts @@ -38,8 +38,12 @@ export const constructPromptsArray = ( getLanguageName(files[0].fileName) //assume the first file is representative of the language ); + const answerLanguage = process.env.LANGUAGE + ? `, Answer me in ${process.env.LANGUAGE},` + : ''; + const prompts = promptPayloads.map((payload) => { - return languageToInstructionPrompt + JSON.stringify(payload); + return languageToInstructionPrompt + JSON.stringify(payload) + answerLanguage; }); return prompts; diff --git a/packages/code-review-gpt/src/review/prompt/prompts.ts b/packages/code-review-gpt/src/review/prompt/prompts.ts index 4d91570..d7bc9f4 100644 --- a/packages/code-review-gpt/src/review/prompt/prompts.ts +++ b/packages/code-review-gpt/src/review/prompt/prompts.ts @@ -29,7 +29,7 @@ Format the response in a valid JSON format as a list of feedbacks, where the val } } -The filenames and file contents to review are provided below as a list of JSON objects, Answer me in Korean: +The filenames and file contents to review are provided below as a list of JSON objects: `;