namespace AIStudio.Provider;
///
/// A chunk of content from a content stream, along with its associated sources.
///
///
/// The usage rides along on the chunk rather than being reported next to the stream, because a
/// provider states it as one more line of that same stream. It is unknown on every chunk but the
/// one which carries it, and unknown on all of them at the providers which report nothing.
///
/// The text content of the chunk.
/// The list of sources associated with the chunk.
/// What the provider said the request cost, where it said anything.
public sealed record ContentStreamChunk(string Content, IList Sources, TokenUsage Usage = default)
{
///
/// Implicit conversion to string.
///
/// The content stream chunk.
/// The text content of the chunk.
public static implicit operator string(ContentStreamChunk chunk) => chunk.Content;
}