You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
// PR OPEN or Trigger phrase: create a new comment
128
-
match issues.create_comment(pull_number,"Hello, I am a [code review bot](https://github.com/flows-network/github-pr-summary/) on [flows.network](https://flows.network/).\n\nIt could take a few minutes for me to analyze this PR. Relax, grab a cup of coffee and check back later. Thanks!").await{
128
+
match issues.create_comment(pull_number,"Hello, I am a [PR summary bot](https://github.com/flows-network/github-pr-summary/) on [flows.network](https://flows.network/).\n\nIt could take a few minutes for me to analyze this PR. Relax, grab a cup of coffee and check back later. Thanks!").await{
let system =&format!("You are an experienced software developer. You will act as a reviewer for a GitHub Pull Request titled\"{}\".", title);
171
+
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);
let question ="The following is a GitHub patch. Please summarize the key changesand identify potential problems. Start with the most important findings.\n\n".to_string() +truncate(commit,CHAR_SOFT_LIMIT);
186
+
let question ="The following is a GitHub patch. Please summarize the key changesin concise points. Start with the most important findings.\n\n".to_string() +truncate(commit,CHAR_SOFT_LIMIT);
187
187
match lf.chat_completion(&chat_id,&question,&co).await{
log::debug!("ReceivedOpenAI resp for patch: {}", commit_hash);
199
+
log::debug!("ReceivedLLM resp for patch: {}", commit_hash);
200
200
}
201
201
Err(e) =>{
202
-
log::error!("OpenAI returned an error for commit {commit_hash}: {}", e);
202
+
log::error!("LLM returned an error for commit {commit_hash}: {}", e);
203
203
}
204
204
}
205
205
}
206
206
207
207
letmut resp =String::new();
208
-
resp.push_str("Hello, I am a [code review bot](https://github.com/flows-network/github-pr-summary/) on [flows.network](https://flows.network/). Here are my reviews of code commits in this PR.\n\n------\n\n");
208
+
resp.push_str("Hello, I am a [PR summary bot](https://github.com/flows-network/github-pr-summary/) on [flows.network](https://flows.network/). Here are my reviews of code commits in this PR.\n\n------\n\n");
209
209
if reviews.len() >1{
210
-
log::debug!("Sending all reviews toOpenAI for summarization");
210
+
log::debug!("Sending all reviews toLLM for summarization");
211
211
let co =ChatOptions{
212
212
model:Some(&llm_model_name),
213
213
restart:true,
214
214
system_prompt:Some(system),
215
215
..Default::default()
216
216
};
217
-
let question ="Here is a set of summaries forsoftwaresource code patches. Each summary starts with a ------ line.Please writean overall summary considering all the individual summary. Please present the potential issues and errors first, following by the most important findings, in your summary.\n\n".to_string() +&reviews_text;
217
+
let question ="Here is a set of summaries for source code patches in this PR. Each summary starts with a ------ line.Writean overall summary. Present the potential issues and errors first, following by the most important findings, in your summary.\n\n".to_string() +&reviews_text;
218
218
match lf.chat_completion(&chat_id,&question,&co).await{
219
219
Ok(r) =>{
220
220
resp.push_str(&r.choice);
221
221
resp.push_str("\n\n## Details\n\n");
222
222
log::debug!("Received the overall summary");
223
223
}
224
224
Err(e) =>{
225
-
log::error!("OpenAI returned an error for the overall summary: {}", e);
225
+
log::error!("LLM returned an error for the overall summary: {}", e);