| | | 1 | | using System.ComponentModel; |
| | | 2 | | using Spectre.Console; |
| | | 3 | | using Spectre.Console.Cli; |
| | | 4 | | |
| | | 5 | | namespace Orchestrator.Commands.Observability.AnalyzeMatch; |
| | | 6 | | |
| | | 7 | | public class AnalyzeMatchBaseSettings : CommandSettings |
| | | 8 | | { |
| | | 9 | | [CommandArgument(0, "<MODEL>")] |
| | | 10 | | [Description("The OpenAI model to use for prediction (e.g., gpt-4o-mini, o4-mini)")] |
| | | 11 | | public string Model { get; set; } = string.Empty; |
| | | 12 | | |
| | | 13 | | [CommandOption("--community-context")] |
| | | 14 | | [Description("The Kicktipp community identifier used for both schedule lookups and context documents")] |
| | | 15 | | public string CommunityContext { get; set; } = string.Empty; |
| | | 16 | | |
| | | 17 | | [CommandOption("--home")] |
| | | 18 | | [Description("Home team name")] |
| | | 19 | | public string HomeTeam { get; set; } = string.Empty; |
| | | 20 | | |
| | | 21 | | [CommandOption("--away")] |
| | | 22 | | [Description("Away team name")] |
| | | 23 | | public string AwayTeam { get; set; } = string.Empty; |
| | | 24 | | |
| | | 25 | | [CommandOption("--matchday")] |
| | | 26 | | [Description("Matchday number for the selected match")] |
| | | 27 | | public int? Matchday { get; set; } |
| | | 28 | | |
| | | 29 | | [CommandOption("-n|--runs")] |
| | | 30 | | [Description("Number of runs to execute")] |
| | | 31 | | [DefaultValue(3)] |
| | | 32 | | public int Runs { get; set; } = 3; |
| | | 33 | | |
| | | 34 | | [CommandOption("--verbose")] |
| | | 35 | | [Description("Enable verbose output for context retrieval")] |
| | | 36 | | [DefaultValue(false)] |
| | | 37 | | public bool Verbose { get; set; } |
| | | 38 | | |
| | | 39 | | [CommandOption("--show-context-documents")] |
| | | 40 | | [Description("Print the list of loaded context documents")] |
| | | 41 | | [DefaultValue(false)] |
| | | 42 | | public bool ShowContextDocuments { get; set; } |
| | | 43 | | |
| | | 44 | | [CommandOption("--debug")] |
| | | 45 | | [Description("Enable detailed logging output")] |
| | | 46 | | [DefaultValue(false)] |
| | | 47 | | public bool Debug { get; set; } |
| | | 48 | | |
| | | 49 | | public override ValidationResult Validate() |
| | | 50 | | { |
| | | 51 | | if (string.IsNullOrWhiteSpace(Model)) |
| | | 52 | | { |
| | | 53 | | return ValidationResult.Error("Model is required"); |
| | | 54 | | } |
| | | 55 | | |
| | | 56 | | if (string.IsNullOrWhiteSpace(CommunityContext)) |
| | | 57 | | { |
| | | 58 | | return ValidationResult.Error("--community-context is required"); |
| | | 59 | | } |
| | | 60 | | |
| | | 61 | | if (string.IsNullOrWhiteSpace(HomeTeam)) |
| | | 62 | | { |
| | | 63 | | return ValidationResult.Error("--home must be provided"); |
| | | 64 | | } |
| | | 65 | | |
| | | 66 | | if (string.IsNullOrWhiteSpace(AwayTeam)) |
| | | 67 | | { |
| | | 68 | | return ValidationResult.Error("--away must be provided"); |
| | | 69 | | } |
| | | 70 | | |
| | | 71 | | if (!Matchday.HasValue) |
| | | 72 | | { |
| | | 73 | | return ValidationResult.Error("--matchday must be provided"); |
| | | 74 | | } |
| | | 75 | | |
| | | 76 | | if (Runs <= 0) |
| | | 77 | | { |
| | | 78 | | return ValidationResult.Error("--runs must be greater than 0"); |
| | | 79 | | } |
| | | 80 | | |
| | | 81 | | return ValidationResult.Success(); |
| | | 82 | | } |
| | | 83 | | } |
| | | 84 | | |
| | | 85 | | public class AnalyzeMatchDetailedSettings : AnalyzeMatchBaseSettings |
| | | 86 | | { |
| | | 87 | | [CommandOption("--no-live-estimates")] |
| | | 88 | | [Description("Disable live cost and time estimates during execution")] |
| | | 89 | | [DefaultValue(false)] |
| | 0 | 90 | | public bool NoLiveEstimates { get; set; } |
| | | 91 | | } |
| | | 92 | | |
| | | 93 | | public class AnalyzeMatchComparisonSettings : AnalyzeMatchBaseSettings |
| | | 94 | | { |
| | | 95 | | } |