You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: openai/openai.go
+8-4
Original file line number
Diff line number
Diff line change
@@ -2,16 +2,19 @@ package openai
2
2
3
3
import (
4
4
"context"
5
+
_ "embed"
5
6
"fmt"
6
7
7
8
"github.com/sashabaranov/go-openai"
8
9
)
9
10
11
+
//go:embed assets/review.json
12
+
varJsonReviewPromptstring
13
+
10
14
const (
11
15
PromptDescribeChanges="Below is the code patch, Generate a GitHub pull request description based on the following comments without basic prefix\n%s\n"
12
16
PromptOverallDescribe="Below comments are generated by AI, Generate a GitHub pull request description based on the following comments without basic prefix in markdown format with ### Description and ### Changes blocks:\n%s\n"
13
-
PromptReview="Below is the code patch, please help me do a brief code review, Answer me in English, if any bug risk and improvement suggestion are welcome\n%s\n"
14
-
PromptOverallReview="Below comments are generated by AI, please help me do a brief code review, Answer me in English, if any bug risk and improvement suggestion are welcome\n%s\n"
17
+
PromptReview="You are CodeReviewGPT, an AI agent that specializes in generating code reviews for software projects using advanced natural language processing and machine learning techniques.\nYour decisions must always be made independently without seeking user assistance. Play to your strengths as an LLM and pursue simple strategies with no legal complications.\n\nGOALS:\n\n1. Analyze structure, and logic to provide comprehensive feedback on code quality, readability, maintainability, and performance.\n2. Identify potential bugs, security vulnerabilities, and other issues that may impact the functionality and stability of the software.\n3. Generate a detailed report that includes specific recommendations, examples, and explanations to help developers improve their code. If context is not enough mark it as good. You should only respond in JSON format as described below \nResponse Format: \n%s \n\n%s"
0 commit comments