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 05157e4..0e70f93 100644 --- a/packages/code-review-gpt/src/review/prompt/constructPrompt/constructPrompt.ts +++ b/packages/code-review-gpt/src/review/prompt/constructPrompt/constructPrompt.ts @@ -38,13 +38,9 @@ export const constructPromptsArray = ( getLanguageName(files[0].fileName) //assume the first file is representative of the language ); - const answerLanguage = process.env.LANGUAGE - ? `, Answer me in Korean, 답변은 한글로 달아줘` - : ''; - const prompts = promptPayloads.map((payload) => { return languageToInstructionPrompt + JSON.stringify(payload); }); - return [...prompts, 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 d7bc9f4..ad2c92e 100644 --- a/packages/code-review-gpt/src/review/prompt/prompts.ts +++ b/packages/code-review-gpt/src/review/prompt/prompts.ts @@ -16,7 +16,7 @@ Ensure the feedback details are brief, concise, accurate. If there are multiple Include brief example code snippets in the feedback details for your suggested changes when you're confident your suggestions are improvements. Use the same programming language as the file under review. If there are multiple improvements you suggest in the feedback details, use an ordered list to indicate the priority of the changes. -Format the response in a valid JSON format as a list of feedbacks, where the value is an object containing the filename ("fileName"), risk score ("riskScore") and the feedback ("details"). The schema of the JSON feedback object must be: +Format the response in a valid JSON format as a list of feedbacks, where the value is an object containing the filename ("fileName"), risk score ("riskScore") and the feedback ("details"). The schema of the JSON feedback object must be: { "fileName": { "type": "string" @@ -31,8 +31,8 @@ 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: +Please provide the feedback in Korean. `; - export const completionPrompt = ` You are a senior developer and have just reviewed a pull request. This was your feedback: {feedback} @@ -70,4 +70,5 @@ Format the response in a valid JSON format as a list of feedbacks, where the val The code to review is provided below: -`; +Please provide the feedback in Korean. +`; \ No newline at end of file