using System.Text.Json;
using System.Text.Json.Serialization;
namespace AIStudio.Provider.OpenAI;
///
/// The delta text of a choice.
///
public sealed record ChatCompletionDelta
{
[JsonPropertyName("content")]
public JsonElement? RawContent { get; set; }
[JsonIgnore]
public string Content => ChatCompletionContent.GetText(this.RawContent) ?? string.Empty;
///
/// The reasoning text some providers stream next to the answer.
///
///
/// Read only to tell that the model is reasoning, see ContentStreamChunk.IsReasoning.
///
public string? ReasoningContent { get; set; }
}