Skip to content

Commit

Permalink
feat: fix gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
willy-dunamu committed Sep 4, 2024
1 parent 6b94f38 commit 89ad615
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
7 changes: 4 additions & 3 deletions packages/code-review-gpt/src/review/prompt/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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}
Expand Down Expand Up @@ -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.
`;

0 comments on commit 89ad615

Please sign in to comment.