Skip to content

Commit 3bdbef4

Browse files
committed
Update prompt
Signed-off-by: Michael Yuan <michael@secondstate.io>
1 parent 4aad3b7 commit 3bdbef4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/github-pr-summary.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ async fn handler(payload: EventPayload) {
155155
}
156156

157157
let chat_id = format!("PR#{pull_number}");
158-
let system = &format!("You are an experienced software developer. You will act as a reviewer for a GitHub Pull Request titled \"{}\". Please be as concise as possible while being accurate.", title);
158+
let system = &format!("You are an experienced software developer. You will act as a reviewer for a GitHub Pull Request titled \"{}\". Please be concise while being accurate.", title);
159159
let mut lf = LLMServiceFlows::new(&llm_api_endpoint);
160160
lf.set_api_key(&llm_api_key);
161161
// lf.set_retry_times(3);
@@ -173,6 +173,7 @@ async fn handler(payload: EventPayload) {
173173
..Default::default()
174174
};
175175
let question = "The following is a GitHub patch. Please summarize the key changes in concise points. Start with the most important findings.\n\n".to_string() + truncate(commit, ctx_size_char);
176+
log::debug!("LLM request: {}", &question);
176177
match lf.chat_completion(&chat_id, &question, &co).await {
177178
Ok(r) => {
178179
log::debug!("LLM answer: {}", &r.choice);
@@ -206,6 +207,7 @@ async fn handler(payload: EventPayload) {
206207
..Default::default()
207208
};
208209
let question = "Here is a set of summaries for source code patches in this PR. Each summary starts with a ------ line. Write an overall summary. Present the potential issues and errors first, following by the most important findings, in your summary.\n\n".to_string() + &reviews_text;
210+
log::debug!("LLM request: {}", &question);
209211
match lf.chat_completion(&chat_id, &question, &co).await {
210212
Ok(r) => {
211213
log::debug!("LLM answer: {}", &r.choice);

0 commit comments

Comments
 (0)