Add prompt debug

This commit is contained in:
Romain Pomier 2023-12-06 16:17:58 +01:00
parent 9a7291855b
commit c45ad2834d
No known key found for this signature in database
GPG key ID: 8BB93B7AA0C163E6
3 changed files with 11 additions and 8 deletions

6
dist/index.js vendored
View file

@ -112,7 +112,7 @@ function createPrompt(file, chunk, prDetails) {
? ""
: `Your review will only ensure the following rules are followed:
${rules.replace(/\n/g, "\n- ")}`;
return `Your name is ${botName}. Your task is to review pull requests. ${rulesPrompt}
const prompt = `Your name is ${botName}. Your task is to review pull requests. ${rulesPrompt}
Here are your instructions regarding the format and the style of the review:
- Provide the response in following JSON format: {"reviews": [{"lineNumber": <line_number>, "reviewComment": "<review comment>"}]}
- Do not give positive comments or compliments.
@ -129,7 +129,9 @@ Pull request description:
---
${prDetails.description}
---
---`;
console.log(prompt);
return `${prompt}
Git diff to review: