using AIStudio.Components; using Microsoft.AspNetCore.Components; namespace AIStudio.Assistants.ModelComparison; /// /// What the summary of a batch says about the model of an answer: its name, how the user voted, whether the judge /// preferred it, and how long it took. /// /// /// Below the answer, not above it: an answer can be long, and what stands above it is out of sight by the time it has /// been read. /// public partial class ModelComparisonAnswerCaption : MSGComponentBase { /// /// Gets or sets the answer, which knows who wrote it. /// [Parameter, EditorRequired] public ModelComparisonAnswer Answer { get; set; } = null!; /// /// Gets or sets the model whose answer this is. /// [Parameter, EditorRequired] public ModelComparisonModelChoice Model { get; set; } /// /// Gets or sets the model the user preferred in the run, or null without a vote. /// [Parameter] public ModelComparisonModelChoice? VoteChoice { get; set; } /// /// Gets or sets the model the judge preferred in the run, or null without a usable verdict. /// [Parameter] public ModelComparisonModelChoice? JudgeChoice { get; set; } /// /// Gets or sets further classes of the column, e.g., its order in the grid, which differs in a narrow window: /// there, the caption follows right below its answer. /// [Parameter] public string ItemClass { get; set; } = string.Empty; /// /// Says how long the answer took: until the first piece arrived, and until it was complete. /// private string TimesText => string.Format( ModelComparisonFormat.Culture, T("First token after {0}, complete after {1}"), ModelComparisonFormat.Duration(this.Answer.FirstTokenTime), ModelComparisonFormat.Duration(this.Answer.TotalTime)); }