using System.Text.Json; namespace AIStudio.Provider.Anthropic; /// /// One line of a streamed Anthropic messages call. /// /// The kind of event this line reports. /// Which content block the event belongs to; blocks are correlated by it. /// The block as it opens, for a content block start. /// The piece this event adds, for a content block delta or a message delta. public readonly record struct AnthropicStreamLine(string? Type, int Index, JsonElement ContentBlock, AnthropicStreamDelta Delta) { /// /// The message the stream opens with, for a message start. /// /// /// Not a positional parameter, because nobody but the serializer ever builds this line with /// one. It is what states the usage, for the reason given at ResponseStreamLine.GetUsage. /// public AnthropicStreamMessage? Message { get; init; } }