From 2aa04099864a8f38671d3f80c5e5aa89d9980b3c Mon Sep 17 00:00:00 2001 From: Josh Date: Sun, 3 Nov 2024 01:06:56 -0230 Subject: [PATCH 1/2] System message to create persona --- GithubPRReviewBot/Services/LlmReviewService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GithubPRReviewBot/Services/LlmReviewService.cs b/GithubPRReviewBot/Services/LlmReviewService.cs index 6a69e17..7c9d4d8 100644 --- a/GithubPRReviewBot/Services/LlmReviewService.cs +++ b/GithubPRReviewBot/Services/LlmReviewService.cs @@ -21,7 +21,7 @@ public async Task LlmReviewDiff(string diff) var chatRequest = new ChatRequest() { Messages = - [ + [ new ChatMessage(ChatMessageRole.System, $"You are an AI-powered code reviewer."), new ChatMessage(ChatMessageRole.User, $"Please review the following code diff: {diff}") ], Model = model, From 9581a9ec23ae3d60e39b46745772159265d37697 Mon Sep 17 00:00:00 2001 From: Josh Date: Sun, 3 Nov 2024 01:08:12 -0230 Subject: [PATCH 2/2] Formatting --- GithubPRReviewBot/Services/LlmReviewService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GithubPRReviewBot/Services/LlmReviewService.cs b/GithubPRReviewBot/Services/LlmReviewService.cs index 7c9d4d8..71bf6a4 100644 --- a/GithubPRReviewBot/Services/LlmReviewService.cs +++ b/GithubPRReviewBot/Services/LlmReviewService.cs @@ -21,7 +21,8 @@ public async Task LlmReviewDiff(string diff) var chatRequest = new ChatRequest() { Messages = - [ new ChatMessage(ChatMessageRole.System, $"You are an AI-powered code reviewer."), + [ + new ChatMessage(ChatMessageRole.System, $"You are an AI-powered code reviewer."), new ChatMessage(ChatMessageRole.User, $"Please review the following code diff: {diff}") ], Model = model,