mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-09-27 10:33:37 +00:00
26 lines
745 B
C#
26 lines
745 B
C#
using System.Text.Json;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace AIStudio.Provider.OpenAI;
|
|
|
|
public sealed record ChatCompletionResponseMessage
|
|
{
|
|
public string Role { get; init; } = string.Empty;
|
|
|
|
[JsonPropertyName("content")]
|
|
public JsonElement? RawContent { get; init; }
|
|
|
|
[JsonIgnore]
|
|
public string? Content => ChatCompletionContent.GetText(this.RawContent);
|
|
|
|
public string? ReasoningContent { get; init; }
|
|
|
|
public string? Reasoning { get; init; }
|
|
|
|
public IList<JsonElement>? ReasoningDetails { get; init; }
|
|
|
|
public IList<ChatCompletionToolCall?>? ToolCalls { get; init; }
|
|
|
|
public string GetThinkingOutput() => ThinkingContent.Get(this.ReasoningContent, this.Reasoning, this.ReasoningDetails);
|
|
}
|