Skip to content

StreamingChatCompletionUpdate.FinishReason is always null #358

Open
@mgesing

Description

@mgesing

Service

OpenAI

Describe the bug

For a CompleteChatStreamingAsync request the property StreamingChatCompletionUpdate.FinishReason is always null. Stop is expected when the response has been transmitted in full or length when the maximum number of tokens per request has been reached.

In comparison, ChatCompletion.FinishReason is set correctly when using CompleteChatAsync.

Steps to reproduce

Set ChatCompletionOptions.MaxOutputTokenCount to a value that is less than the tokens required for the response and make a request using CompleteChatStreamingAsync.

Code snippets

OS

Windows 10

.NET version

.NET 9.0

Library version

OpenAI 2.1.0

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions