From c41e9e447054959e132df0a6be9499ab10085581 Mon Sep 17 00:00:00 2001 From: Demis Bellot Date: Mon, 6 May 2024 10:22:18 +0800 Subject: [PATCH] Update CreateAnswerCommentTaskCommand.cs --- .../AiServer/CreateAnswerCommentTaskCommand.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/MyApp.ServiceInterface/AiServer/CreateAnswerCommentTaskCommand.cs b/MyApp.ServiceInterface/AiServer/CreateAnswerCommentTaskCommand.cs index 48fd718..ae117da 100644 --- a/MyApp.ServiceInterface/AiServer/CreateAnswerCommentTaskCommand.cs +++ b/MyApp.ServiceInterface/AiServer/CreateAnswerCommentTaskCommand.cs @@ -24,10 +24,10 @@ public async Task ExecuteAsync(CreateAnswerCommentTask request) request.AiRef ??= Guid.NewGuid().ToString("N"); var answerPrompt = - $$""" + $""" ## Original Answer Attempt - {{request.Answer.Body}} + {request.Answer.Body} --- """; @@ -59,6 +59,14 @@ public async Task ExecuteAsync(CreateAnswerCommentTask request) openAiChat.Messages.Add(new() { Role = "assistant", Content = comment.Body }); } } + openAiChat.Messages.Add(new() { Role = "user", + Content = """ + ## Instruction + Answer the question query above in a concise manner. + Keep your response on the topic of the original question and answer, directly addressing my specific comment. + Max 2-3 sentences. + """ + }); var client = appConfig.CreateAiServerClient();