< Summary

Information
Class: UIBlazor.Services.Models.StreamChunk
Assembly: UIBlazor
File(s): /home/runner/work/InvAit/InvAit/UIBlazor/Services/Models/StreamChunk.cs
Tag: 71_26091983037
Line coverage
80%
Covered lines: 4
Uncovered lines: 1
Coverable lines: 5
Total lines: 32
Line coverage: 80%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Id()100%11100%
get_Model()100%11100%
get_Choices()100%11100%
get_Usage()100%11100%
get_Choice()100%210%

File(s)

/home/runner/work/InvAit/InvAit/UIBlazor/Services/Models/StreamChunk.cs

#LineLine coverage
 1namespace UIBlazor.Services.Models;
 2
 3public class StreamChunk
 4{
 5    /// <summary>
 6    /// Id ответа. Один на все чанки в одном стриме.
 7    /// </summary>
 8    [JsonPropertyName("id")]
 2849    public string Id { get; set; } = string.Empty;
 10
 11    /// <summary>
 12    /// Имя модели, которая отвечает.
 13    /// Обычно только первый ответ содержит модель. Но некоторые ответы постоянно отдают имя весь стрим.
 14    /// </summary>
 15    [JsonPropertyName("model")]
 10716    public string? Model { get; set; }
 17
 18    /// <summary>
 19    /// Всегда один элемент
 20    /// </summary>
 21    [JsonPropertyName("choices")]
 71022    public List<ChatChoice> Choices { get; set; } = [];
 23
 24    /// <summary>
 25    /// Usage information. Usually provided in the last chunk if stream_options: { include_usage: true } is set.
 26    /// </summary>
 27    [JsonPropertyName("usage")]
 24628    public UsageInfo? Usage { get; set; }
 29
 30    [JsonIgnore]
 031    public ChatChoice? Choice => Choices.FirstOrDefault();
 32}