minor change

This commit is contained in:
Jicheng Lu 2024-05-30 11:17:52 -05:00
parent 1a554ea15a
commit d8615ead54

View file

@ -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";
}
}