mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-08-11 20:32:11 +00:00
17 lines
401 B
C#
17 lines
401 B
C#
using System.Text.Json;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace AIStudio.Provider.OpenAI;
|
|
|
|
/// <summary>
|
|
/// The delta text of a choice.
|
|
/// </summary>
|
|
public sealed record ChatCompletionDelta
|
|
{
|
|
[JsonPropertyName("content")]
|
|
public JsonElement? RawContent { get; init; }
|
|
|
|
[JsonIgnore]
|
|
public string Content => ChatCompletionContent.GetText(this.RawContent) ?? string.Empty;
|
|
}
|