From db295e525968cb4a4dfacf63d58b30542aa3e34b Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Fri, 13 Feb 2026 21:34:31 +0100 Subject: [PATCH] Improved null handling --- .../Provider/OpenAI/ResponsesDeltaStreamLine.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/MindWork AI Studio/Provider/OpenAI/ResponsesDeltaStreamLine.cs b/app/MindWork AI Studio/Provider/OpenAI/ResponsesDeltaStreamLine.cs index 98ea7eb2..0c1767d0 100644 --- a/app/MindWork AI Studio/Provider/OpenAI/ResponsesDeltaStreamLine.cs +++ b/app/MindWork AI Studio/Provider/OpenAI/ResponsesDeltaStreamLine.cs @@ -7,7 +7,7 @@ namespace AIStudio.Provider.OpenAI; /// The delta content of the response. public record ResponsesDeltaStreamLine( string Type, - string Delta) : IResponseStreamLine + string? Delta) : IResponseStreamLine { #region Implementation of IResponseStreamLine @@ -15,7 +15,7 @@ public record ResponsesDeltaStreamLine( public bool ContainsContent() => this.Delta is not null; /// - public ContentStreamChunk GetContent() => new(this.Delta, this.GetSources()); + public ContentStreamChunk GetContent() => new(this.Delta ?? string.Empty, this.GetSources()); // // Please note that there are multiple options where LLM providers might stream sources: @@ -36,4 +36,4 @@ public record ResponsesDeltaStreamLine( public IList GetSources() => []; #endregion -} +} \ No newline at end of file