Describe the bug
The extension method ChatCompletionExtensions.GenerateMessageStreamAsync() returns an unexpected null as last message.
To Reproduce
Steps to reproduce the behavior:
- Consider this sample
- Change the code to
Console.Write(message ?? "#NULL#"); to highlight any null value returned
Expected behavior
GenerateMessageStreamAsync() doesn't return any null string.
Platform
- OS: Mac
- IDE: Rider
- Language: C#
- Source: NuGet Microsoft.SemanticKernel version="0.24.230918.1-preview