mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-14 03:13: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
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user