< Summary

Information
Class: Intentum.AI.SystemOne.SystemOneAnswer
Assembly: Intentum.AI.SystemOne
File(s): /home/runner/work/Intentum/Intentum/src/Intentum.AI.SystemOne/SystemOneResponse.cs
Line coverage
100%
Covered lines: 6
Uncovered lines: 0
Coverable lines: 6
Total lines: 40
Line coverage: 100%
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

File(s)

/home/runner/work/Intentum/Intentum/src/Intentum.AI.SystemOne/SystemOneResponse.cs

#LineLine coverage
 1using System.Text.Json.Serialization;
 2
 3namespace Intentum.AI.SystemOne;
 4
 5/// <summary>Answer for a single typed question returned by a System One engine.</summary>
 6public sealed class SystemOneAnswer
 7{
 8    /// <summary>Most likely option for a choice question.</summary>
 9    [JsonPropertyName("choice")]
 410    public string? Choice { get; init; }
 11
 12    /// <summary>Probability per option for a choice/score question.</summary>
 13    [JsonPropertyName("probabilities")]
 414    public IReadOnlyDictionary<string, double>? Probabilities { get; init; }
 15
 16    /// <summary>Engine-reported confidence of the answer.</summary>
 17    [JsonPropertyName("confidence")]
 518    public double? Confidence { get; init; }
 19
 20    /// <summary>Probability of the reported answer (Laya and newer engines).</summary>
 21    [JsonPropertyName("answer_confidence")]
 122    public double? AnswerConfidence { get; init; }
 23
 24    /// <summary>Probability of yes for a noul question.</summary>
 25    [JsonPropertyName("noul")]
 326    public double? Noul { get; init; }
 27
 28    /// <summary>Mean level index for a score question (0-based).</summary>
 29    [JsonPropertyName("score")]
 330    public double? Score { get; init; }
 31}
 32
 33/// <summary>Response payload of POST /v1/systemone.</summary>
 34public sealed class SystemOneResponse
 35{
 36    /// <summary>Answers keyed by question id.</summary>
 37    [JsonPropertyName("answers")]
 38    public IReadOnlyDictionary<string, SystemOneAnswer> Answers { get; init; } =
 39        new Dictionary<string, SystemOneAnswer>();
 40}