Skip to content

.Net: Stream response should not skip white space #2921

@anthonypuppo

Description

@anthonypuppo

Describe the bug
The current Azure OpenAI streaming implementation skips white space (ie. space character token ID 220). All non-empty tokens should be streamed, including space characters. This is rare as most tokens are prefixed with a space by default, but still an issue in some cases (such as formatted markdown, code, etc).

To Reproduce
Steps to reproduce the behavior:

  1. Generate a response that would include space tokens (any sort of code)
  2. Space tokens are skipped

Expected behavior
Stream all non-empty generated tokens.

Screenshots
N/A

Platform

Metadata

Metadata

Assignees

Labels

.NETIssue or Pull requests regarding .NET codebugSomething isn't working

Type

No type

Projects

Status

Sprint: Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions