Skip to content

Commit

Permalink
Fix the output for assistant.
Browse files Browse the repository at this point in the history
  • Loading branch information
mehrandvd committed Jan 2, 2024
1 parent 81916f4 commit 18da9ad
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/skUnit/Asserts/SemanticKernelAssert_Chat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,21 @@ public async Task CheckChatScenarioAsync(Kernel kernel, ChatScenario scenario, F
while (queue.Count > 0)
{
var chatItem = queue.Dequeue();
Log($"## [{chatItem.Role.ToString().ToUpper()}]");
Log(chatItem.Content);
Log();


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

if (chatItem.Role == AuthorRole.User)
Log($"## [{chatItem.Role.ToString().ToUpper()}]");
Log(chatItem.Content);
Log();
}
else if (chatItem.Role == AuthorRole.User)
{
chatHistory.AddUserMessage(chatItem.Content);
Log($"## [{chatItem.Role.ToString().ToUpper()}]");
Log(chatItem.Content);
Log();
}
else if (chatItem.Role == AuthorRole.Assistant)
{
Expand Down

0 comments on commit 18da9ad

Please sign in to comment.