mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-09-02 22:02:56 +00:00
Some checks are pending
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage deb updater) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Read metadata (push) Waiting to run
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage deb updater) (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
Co-authored-by: Thorsten Sommer <mail@tsommer.org>
24 lines
929 B
C#
24 lines
929 B
C#
// ReSharper disable NotAccessedPositionalProperty.Global
|
|
namespace AIStudio.Provider.Anthropic;
|
|
|
|
/// <summary>
|
|
/// Represents a response stream line.
|
|
/// </summary>
|
|
/// <param name="Type">The type of the response line.</param>
|
|
/// <param name="Index">The index of the response line.</param>
|
|
/// <param name="Delta">The delta of the response line.</param>
|
|
public readonly record struct ResponseStreamLine(string Type, int Index, Delta Delta) : IResponseStreamLine
|
|
{
|
|
/// <inheritdoc />
|
|
public bool ContainsContent() => this != default && !string.IsNullOrWhiteSpace(this.Delta.Text);
|
|
|
|
/// <inheritdoc />
|
|
public ContentStreamChunk GetContent() => new(this.Delta.Text, []);
|
|
}
|
|
|
|
/// <summary>
|
|
/// The delta object of a response line.
|
|
/// </summary>
|
|
/// <param name="Type">The type of the delta.</param>
|
|
/// <param name="Text">The text of the delta.</param>
|
|
public readonly record struct Delta(string Type, string Text); |