From c61a4fed02cbcd93dc87b59a7533943d31a2bbb8 Mon Sep 17 00:00:00 2001 From: kaede10 Date: Thu, 19 Oct 2023 20:31:14 +0800 Subject: [PATCH] get summary of answer --- pr-message/src/gpt/chat_gpt.py | 1 - pr-message/src/handle/comment_command.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pr-message/src/gpt/chat_gpt.py b/pr-message/src/gpt/chat_gpt.py index 19b7984..7385014 100644 --- a/pr-message/src/gpt/chat_gpt.py +++ b/pr-message/src/gpt/chat_gpt.py @@ -14,7 +14,6 @@ class ChatGpt(Gpt): "content": ( "您将充当 git 中提交消息的作者。" "您的任务是在传统git提交中创建清晰且全面的提交消息,详细清晰的解释更改内容。 我将向您发送“git diff --staged”命令的输出,然后您将以\"+\"和\"-\"开头的行内容转换为提交消息。" - "不得超过 5 行" "行长度不得超过 74 个字符。" "用中文回答。" "使用如下模板:" diff --git a/pr-message/src/handle/comment_command.py b/pr-message/src/handle/comment_command.py index 9cc20de..4e0e626 100644 --- a/pr-message/src/handle/comment_command.py +++ b/pr-message/src/handle/comment_command.py @@ -61,7 +61,7 @@ def summary_message(data): continue comment += single_comment + "\n\n" - # summarize = GptClassFactory.create_class().get_summary(comment) + summarize = GptClassFactory.create_class().get_summary(comment) # comment += summarize project = data.get("project", None) @@ -84,6 +84,6 @@ def summary_message(data): logger.error("no number") return - pr_client = PullRequestComments(owner, repo, number, comment, None, None, None) + pr_client = PullRequestComments(owner, repo, number, summarize, None, None, None) pr_client.submit_pull_request_comments() -- Gitee