// ReSharper disable NotAccessedPositionalProperty.Global namespace AIStudio.Provider.Anthropic; /// /// Represents a response stream line. /// /// The type of the response line. /// The index of the response line. /// The delta of the response line. public readonly record struct ResponseStreamLine(string Type, int Index, Delta Delta) : IResponseStreamLine { /// public bool ContainsContent() => this != default && !string.IsNullOrWhiteSpace(this.Delta.Text); /// public ContentStreamChunk GetContent() => new(this.Delta.Text, []); #region Implementation of IAnnotationStreamLine // // Please note: Anthropic's API does not currently support sources in their // OpenAI-compatible response stream. // /// public bool ContainsSources() => false; /// public IList GetSources() => []; #endregion } /// /// The delta object of a response line. /// /// The type of the delta. /// The text of the delta. public readonly record struct Delta(string Type, string Text);