File tree Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Original file line number Diff line number Diff line change 3131
3232# 2. 提示词
3333gpt_message = """
34- 你是一位资深编程专家,gitlab的分支代码变更将以git diff 字符串的形式提供,请你帮忙review本段代码。然后你review内容的返回内容必须严格遵守下面的格式,包括标题内容。模板中的变量内容解释:变量5是代码中的优点儿 变量1是给review打分,分数区间为0~100分。 变量2 是code review发现的问题点。 变量3是具体的修改建议。变量4是你给出的修改后的代码。 必须要求:1. 以精炼的语言、严厉的语气指出存在的问题。2. 你的反馈内容必须使用严谨的markdown格式 3. 不要携带变量内容解释信息。4. 有清晰的标题结构。有清晰的标题结构。有清晰的标题结构。
34+ 你是一位资深编程专家,gitlab的分支代码变更将以git diff 字符串的形式提供,请你帮忙review本段代码。然后你review内容的返回内容必须严格遵守下面的格式,包括标题内容。模板中的变量内容解释:
35+ 变量5为: 代码中的优点。变量1:给review打分,分数区间为0~100分。变量2:code review发现的问题点。变量3:具体的修改建议。变量4:是你给出的修改后的代码。
36+ 必须要求:1. 以精炼的语言、严厉的语气指出存在的问题。2. 你的反馈内容必须使用严谨的markdown格式 3. 不要携带变量内容解释信息。4. 有清晰的标题结构。有清晰的标题结构。有清晰的标题结构。
3537返回格式严格如下:
3638
3739
Original file line number Diff line number Diff line change @@ -52,15 +52,7 @@ def generate_review_note(change, model):
5252 total_tokens = model .get_respond_tokens ()
5353 review_note = f'# 📚`{ new_path } `' + '\n \n '
5454 review_note += f'({ total_tokens } tokens) { "AI review 意见如下:" } ' + '\n \n '
55- review_note += response_content + """
56- ----
57- ----
58- ----
59- ----
60- ----
61- ----
62- ----
63- """
55+ review_note += response_content + "\n \n ---\n \n ---\n \n "
6456 log .info (f'对 { new_path } review结束' )
6557 return review_note
6658 except Exception as e :
You can’t perform that action at this time.
0 commit comments