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
@@ -0,0 +1,28 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace AIStudio.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Shows one card per mode with which an assistant can start, and reports the mode the user chose.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The assistant shows nothing else until the user chose, so the texts of the options come from the assistant: they
|
||||
/// tell what it does in each mode. Generic, so that every assistant names its modes with an enum of its own.
|
||||
/// </remarks>
|
||||
/// <typeparam name="TMode">The type of the modes of the assistant.</typeparam>
|
||||
public partial class AssistantModeChoice<TMode> : ComponentBase
|
||||
{
|
||||
/// <summary>
|
||||
/// The options to choose from, in the order the cards show them.
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public IReadOnlyList<AssistantModeOption<TMode>> Options { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Called with the mode of the option the user chose.
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public EventCallback<TMode> ModeChosen { get; set; }
|
||||
|
||||
private async Task Choose(AssistantModeOption<TMode> option) => await this.ModeChosen.InvokeAsync(option.Mode);
|
||||
}
|
||||
Reference in new issue
Block a user