Files
AI-Studio/app/MindWork AI Studio/Provider/OpenAI/ChatCompletionDelta.cs
T

16 lines
401 B
C#
Raw Normal View History

2026-09-04 15:48:07 +02:00
using System.Text.Json;
using System.Text.Json.Serialization;
2025-09-03 10:08:04 +02:00
namespace AIStudio.Provider.OpenAI;
/// <summary>
/// The delta text of a choice.
/// </summary>
2026-09-04 15:48:07 +02:00
public sealed record ChatCompletionDelta
2025-09-03 10:08:04 +02:00
{
2026-09-04 15:48:07 +02:00
[JsonPropertyName("content")]
public JsonElement? RawContent { get; init; }
[JsonIgnore]
public string Content => ChatCompletionContent.GetText(this.RawContent) ?? string.Empty;
}