Skip to content

.Net: GenerateMessageStreamAsync returns a null as last element #2900

@paolofulgoni

Description

@paolofulgoni

Describe the bug
The extension method ChatCompletionExtensions.GenerateMessageStreamAsync() returns an unexpected null as last message.

To Reproduce
Steps to reproduce the behavior:

  1. Consider this sample
  2. 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

Metadata

Metadata

Assignees

Labels

.NETIssue or Pull requests regarding .NET codetriage

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions