mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-14 22:08:27 +00:00
Added the Model Comparison assistant for blind comparisons of two models (#1009)
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
1 parent
12f26445ba
commit
b7255694cd
221 files changed
+19989
-90
No files matched your search
+56
@@ -0,0 +1,56 @@
|
||||
using AIStudio.Components;
|
||||
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace AIStudio.Assistants.ModelComparison;
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 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.
|
||||
/// </remarks>
|
||||
public partial class ModelComparisonAnswerCaption : MSGComponentBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the answer, which knows who wrote it.
|
||||
/// </summary>
|
||||
[Parameter, EditorRequired]
|
||||
public ModelComparisonAnswer Answer { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the model whose answer this is.
|
||||
/// </summary>
|
||||
[Parameter, EditorRequired]
|
||||
public ModelComparisonModelChoice Model { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the model the user preferred in the run, or null without a vote.
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public ModelComparisonModelChoice? VoteChoice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the model the judge preferred in the run, or null without a usable verdict.
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public ModelComparisonModelChoice? JudgeChoice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public string ItemClass { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Says how long the answer took: until the first piece arrived, and until it was complete.
|
||||
/// </summary>
|
||||
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));
|
||||
}
|
||||
Reference in new issue
Block a user