mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-15 09:33:48 +00:00
Refactored network code (#253)
This commit is contained in:
1 parent
a54c0bdbbf
commit
33a2728644
13 files changed
+224
-740
No files matched your search
@@ -7,7 +7,14 @@ namespace AIStudio.Provider.Anthropic;
|
||||
/// <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);
|
||||
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 string GetContent() => this.Delta.Text;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The delta object of a response line.
|
||||
|
||||
Reference in new issue
Block a user