Skip to content

Commit

Permalink
Add support for system role in assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
mehrandvd committed Dec 25, 2023
1 parent b86e3b0 commit 0baa635
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/skUnit/Asserts/SemanticKernelAssert_Chat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ public static async Task ScenarioChatSuccessAsync(Kernel kernel, ChatScenario sc
Log(chatItem.Content);
Log();

if (chatItem.Role == AuthorRole.System)
{
chatHistory.AddUserMessage(chatItem.Content);
continue;
}

if (chatItem.Role == AuthorRole.User)
{
chatHistory.AddUserMessage(chatItem.Content);
Expand Down

0 comments on commit 0baa635

Please sign in to comment.