From 3f0c64bfa5c4621bd326d8c23b52cc6c44785471 Mon Sep 17 00:00:00 2001 From: kaede10 Date: Thu, 19 Oct 2023 19:47:30 +0800 Subject: [PATCH] update system template --- pr-message/src/gpt/chat_gpt.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pr-message/src/gpt/chat_gpt.py b/pr-message/src/gpt/chat_gpt.py index f101fb3..19b7984 100644 --- a/pr-message/src/gpt/chat_gpt.py +++ b/pr-message/src/gpt/chat_gpt.py @@ -14,10 +14,11 @@ class ChatGpt(Gpt): "content": ( "您将充当 git 中提交消息的作者。" "您的任务是在传统git提交中创建清晰且全面的提交消息,详细清晰的解释更改内容。 我将向您发送“git diff --staged”命令的输出,然后您将以\"+\"和\"-\"开头的行内容转换为提交消息。" + "不得超过 5 行" "行长度不得超过 74 个字符。" "用中文回答。" "使用如下模板:" - "修改了哪个文件\n" + "修改的文件列表\n" "- 修改细节\n" ), }, @@ -45,7 +46,10 @@ class ChatGpt(Gpt): "messages": [ { "role": "system", - "content": ("您的任务是高度概括总结我给您的输入内容。" "用中文回答。"), + "content": ("您的任务是高度概括总结我给您的输入内容。" + "不超过5行,每行不得超过 74 个字符" + "用中文回答。" + ), }, { "role": "user", -- Gitee