Refactored network code (#253)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2025-01-04 14:11:32 +01:00
1 parent a54c0bdbbf
commit 33a2728644
13 files changed
+224 -740

No files matched your search

@@ -8,7 +8,14 @@ namespace AIStudio.Provider.Fireworks;
/// <param name="Created">The timestamp of the response.</param>
/// <param name="Model">The model used for the response.</param>
/// <param name="Choices">The choices made by the AI.</param>
public readonly record struct ResponseStreamLine(string Id, string Object, uint Created, string Model, IList<Choice> Choices);
public readonly record struct ResponseStreamLine(string Id, string Object, uint Created, string Model, IList<Choice> Choices) : IResponseStreamLine
{
/// <inheritdoc />
public bool ContainsContent() => this != default && this.Choices.Count > 0;
/// <inheritdoc />
public string GetContent() => this.Choices[0].Delta.Content;
}
/// <summary>
/// Data model for a choice made by the AI.