< Summary

Information
Class: Intentum.AI.SystemOne.SystemOneOptions
Assembly: Intentum.AI.SystemOne
File(s): /home/runner/work/Intentum/Intentum/src/Intentum.AI.SystemOne/SystemOneOptions.cs
Line coverage
100%
Covered lines: 11
Uncovered lines: 0
Coverable lines: 11
Total lines: 34
Line coverage: 100%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
Validate()100%22100%

File(s)

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

#LineLine coverage
 1namespace Intentum.AI.SystemOne;
 2
 3/// <summary>Options for a System One compatible decision engine (POST /v1/systemone).</summary>
 4public sealed record SystemOneOptions
 5{
 6    /// <summary>Base URL of the engine, e.g. <c>http://127.0.0.1:8009</c>.</summary>
 667    public string BaseUrl { get; init; } = "";
 8
 9    /// <summary>Engine name (kev, laya, tinyjev, ...). Used as the source of intent signals.</summary>
 4810    public string Engine { get; init; } = "systemone";
 11
 12    /// <summary>Optional API key sent as <c>Authorization: Bearer</c>.</summary>
 813    public string? ApiKey { get; init; }
 14
 15    /// <summary>Endpoint path. Default is the System One <c>/v1/systemone</c>.</summary>
 4016    public string EndpointPath { get; init; } = "/v1/systemone";
 17
 18    /// <summary>Optional model/checkpoint name sent in the request (e.g. <c>kev-latest</c>).</summary>
 1219    public string? Model { get; init; }
 20
 21    /// <summary>Intent catalog: intent name → description. Becomes the options of the intent choice question.</summary>
 2922    public IReadOnlyDictionary<string, string> IntentCatalog { get; init; } = new Dictionary<string, string>();
 23
 24    /// <summary>Instructions for the intent choice question.</summary>
 2225    public string IntentQuestionInstructions { get; init; } = "Which intent best explains the observed behavior?";
 26
 27    /// <summary>Validates required options.</summary>
 28    /// <exception cref="InvalidOperationException">Thrown when <see cref="BaseUrl"/> is empty.</exception>
 29    public void Validate()
 930    {
 931        if (string.IsNullOrWhiteSpace(BaseUrl))
 132            throw new InvalidOperationException("SystemOneOptions.BaseUrl is required (e.g. http://127.0.0.1:8000).");
 833    }
 34}