From d8615ead54fc4321f31ccf2dfd0e086a2419cb91 Mon Sep 17 00:00:00 2001 From: Jicheng Lu <103353@smsassist.com> Date: Thu, 30 May 2024 11:17:52 -0500 Subject: [PATCH] minor change --- .../Conversations/Services/ConversationService.Summary.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationService.Summary.cs b/src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationService.Summary.cs index e71d328d..f5c7d76c 100644 --- a/src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationService.Summary.cs +++ b/src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationService.Summary.cs @@ -22,6 +22,8 @@ public partial class ConversationService if (dialogs.IsNullOrEmpty()) continue; var content = GetConversationContent(dialogs); + if (string.IsNullOrEmpty(content)) continue; + contents.Add(content); } @@ -100,6 +102,11 @@ public partial class ConversationService conversation += $"{role}: {dialog.Payload ?? dialog.Content}\r\n"; } + if (string.IsNullOrEmpty(conversation)) + { + return string.Empty; + } + return conversation + "\r\n"; } }