Skip to content

TextContent "Delta" property wrong implementation! #516

@keiserS

Description

@keiserS

Bug Report

Defined property

[JsonInclude]
        [JsonPropertyName("delta")]
        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
        public string Delta
        {
            get => delta;
            internal set
            {
                if (value == null)
                {
                    delta = null;
                }
                else
                {
                    //delta += value;  <<<<< this is wrong for text content, it appends deltas together
                    delta = value;     <<<< should be this
                }
            }
        }

Explanation

Delta is supposed to be the only difference from the previous response. The current implementation has the Text and Delta properties with the same value. This implementation introduces need for an additional "token" implementation for streaming responses. All other "Delta" response types have proper implementation of the property, except for TextContent.

Metadata

Metadata

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