Skip to content

Fix Summarize MR Changes prompt

Baodong请求将fix/summarize-mr-changes-prompt合并到main-jh

What does this MR do and why?

Fix Summarize MR changes prompt text.

Performing request to MINIMAX
{"severity":"DEBUG","time":"2023-08-15T09:09:53.927Z","correlation_id":"01H7W7AVSYGR0E62ZYKWKYZ6V6","meta.caller_id":"MergeRequests::Llm::SummarizeMergeRequestWorker","meta.remote_ip":"127.0.0.1","meta.feature_category":"code_review_workflow","meta.user":"root","meta.user_id":1,"meta.project":"devs/merge-types","meta.root_namespace":"devs","meta.client_id":"user/1","meta.root_caller_id":"Projects::MergeRequestsController#update","message":"Performing request to MINIMAX: {:temperature=\u003e0.6, :messages=\u003e[{\"sender_type\"=\u003e\"USER\", \"sender_name\"=\u003e\"user\", \"text\"=\u003e\"你是一名代码助理,旨在帮助用非技术术语总结代码。\\n\\n```\\n--- sum.rb\\n+++ sum.rb\\n\\n+# return the sum of a and b\\n+#\\n+def sum(a, b)\\n+  a + b\\n+end\\n\\n\\n```\\n\\n上面的代码(用三个反引号括起来)是合并请求的代码差异。\\n合并请求的标题是: 'Add file sum.rb'\\n\\n用几句话写出变化的摘要,就像专家工程师使用简单的(通常是非技术性的)术语来总结变化一样。\\n\"}], :model=\u003e\"abab5.5-chat\", :bot_setting=\u003e[{:bot_name=\u003e\"JIHU_BOT\", :content=\u003e\"你是一个软件研发专家,可以回答任何软件研发过程中的问题\"}], :reply_constraints=\u003e{:sender_type=\u003e\"BOT\", :sender_name=\u003e\"JIHU_BOT\"}}"}
Received response from MINIMAX
{"severity":"DEBUG","time":"2023-08-15T09:09:56.336Z","correlation_id":"01H7W7AVSYGR0E62ZYKWKYZ6V6","meta.caller_id":"MergeRequests::Llm::SummarizeMergeRequestWorker","meta.remote_ip":"127.0.0.1","meta.feature_category":"code_review_workflow","meta.user":"root","meta.user_id":1,"meta.project":"devs/merge-types","meta.root_namespace":"devs","meta.client_id":"user/1","meta.root_caller_id":"Projects::MergeRequestsController#update","message":"Received response from MINIMAX: {\"created\":1692090596,\"model\":\"abab5.5-chat\",\"reply\":\"这个合并请求添加了一个新的名为“sum.rb”的文件。\\n该文件包含一个名为“sum”的方法,它接收两个参数“a”和“b”,并返回它们的总和。\",\"choices\":[{\"finish_reason\":\"stop\",\"messages\":[{\"sender_type\":\"BOT\",\"sender_name\":\"JIHU_BOT\",\"text\":\"这个合并请求添加了一个新的名为“sum.rb”的文件。\\n该文件包含一个名为“sum”的方法,它接收两个参数“a”和“b”,并返回它们的总和。\"}]}],\"usage\":{\"total_tokens\":440},\"input_sensitive\":false,\"output_sensitive\":false,\"id\":\"012a73e2e9c5a34c4cd42c956f2bdb5f\",\"base_resp\":{\"status_code\":0,\"status_msg\":\"\"}}"}

Screenshots or screen recordings

Screenshot_from_2023-08-15_17-10-33

How to set up and validate locally

Ref: !1864 (merged)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Baodong 编辑于

合并请求报告

加载中