| | | 1 | | namespace Intentum.AI.SystemOne; |
| | | 2 | | |
| | | 3 | | /// <summary>Options for a System One compatible decision engine (POST /v1/systemone).</summary> |
| | | 4 | | public sealed record SystemOneOptions |
| | | 5 | | { |
| | | 6 | | /// <summary>Base URL of the engine, e.g. <c>http://127.0.0.1:8009</c>.</summary> |
| | 66 | 7 | | public string BaseUrl { get; init; } = ""; |
| | | 8 | | |
| | | 9 | | /// <summary>Engine name (kev, laya, tinyjev, ...). Used as the source of intent signals.</summary> |
| | 48 | 10 | | public string Engine { get; init; } = "systemone"; |
| | | 11 | | |
| | | 12 | | /// <summary>Optional API key sent as <c>Authorization: Bearer</c>.</summary> |
| | 8 | 13 | | public string? ApiKey { get; init; } |
| | | 14 | | |
| | | 15 | | /// <summary>Endpoint path. Default is the System One <c>/v1/systemone</c>.</summary> |
| | 40 | 16 | | 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> |
| | 12 | 19 | | public string? Model { get; init; } |
| | | 20 | | |
| | | 21 | | /// <summary>Intent catalog: intent name → description. Becomes the options of the intent choice question.</summary> |
| | 29 | 22 | | public IReadOnlyDictionary<string, string> IntentCatalog { get; init; } = new Dictionary<string, string>(); |
| | | 23 | | |
| | | 24 | | /// <summary>Instructions for the intent choice question.</summary> |
| | 22 | 25 | | 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() |
| | 9 | 30 | | { |
| | 9 | 31 | | if (string.IsNullOrWhiteSpace(BaseUrl)) |
| | 1 | 32 | | throw new InvalidOperationException("SystemOneOptions.BaseUrl is required (e.g. http://127.0.0.1:8000)."); |
| | 8 | 33 | | } |
| | | 34 | | } |