mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-23 14:33:48 +00:00
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
25 lines
685 B
C#
25 lines
685 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; set; }
|
|
|
|
[JsonIgnore]
|
|
public string Content => ChatCompletionContent.GetText(this.RawContent) ?? string.Empty;
|
|
|
|
/// <summary>
|
|
/// The reasoning text some providers stream next to the answer.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Read only to tell that the model is reasoning, see ContentStreamChunk.IsReasoning.
|
|
/// </remarks>
|
|
public string? ReasoningContent { get; set; }
|
|
}
|