mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-05 12:09:40 +00:00
Added an expert option to override model capabilities (#830)
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Read metadata (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Read metadata (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
1 parent
431f0b78d8
commit
e3afe7ff9b
12 files changed
+726
-27
No files matched your search
@@ -105,7 +105,9 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<MudSelect @bind-Value="@this.DataModel"
|
||||
<MudSelect T="Provider.Model"
|
||||
Value="@this.DataModel"
|
||||
ValueChanged="@(async model => await this.OnModelChanged(model))"
|
||||
OpenIcon="@Icons.Material.Filled.FaceRetouchingNatural" AdornmentColor="Color.Info"
|
||||
Adornment="Adornment.Start" Validation="@this.providerValidation.ValidatingModel">
|
||||
@foreach (var model in this.availableModels)
|
||||
@@ -157,8 +159,67 @@
|
||||
</MudButton>
|
||||
<MudDivider />
|
||||
<MudCollapse Expanded="@this.showExpertSettings" Class="@this.GetExpertStyles">
|
||||
<MudJustifiedText Class="mb-5">
|
||||
@T("Please be aware: This section is for experts only. You are responsible for verifying the correctness of the additional parameters you provide to the API call. By default, AI Studio uses the OpenAI-compatible chat completions API, when that it is supported by the underlying service and model.")
|
||||
<MudAlert Severity="Severity.Warning" Class="mb-4">
|
||||
@T("Please be careful: wrong expert settings can break model usage, disable supported features, or make unsupported features appear available.")
|
||||
</MudAlert>
|
||||
<MudText Typo="Typo.subtitle2" Class="mb-2">
|
||||
@T("Override Model Capabilities")
|
||||
</MudText>
|
||||
<MudJustifiedText Typo="Typo.body2" Class="mb-4">
|
||||
@T("Stored default model capabilities may not reflect its full range. Override them here if needed.")
|
||||
</MudJustifiedText>
|
||||
<MudStack Class="mb-4" Spacing="2">
|
||||
@foreach (var capability in SWITCH_CAPABILITY_OVERRIDES)
|
||||
{
|
||||
<MudPaper Outlined="@true" Class="pa-3">
|
||||
<MudStack Row="@true" AlignItems="AlignItems.Center" Justify="Justify.SpaceBetween" Wrap="Wrap.Wrap">
|
||||
<MudStack Spacing="0">
|
||||
<MudText Typo="Typo.body2">
|
||||
@this.GetCapabilityOverrideLabel(capability)
|
||||
</MudText>
|
||||
<MudText Typo="Typo.caption" Color="Color.Secondary">
|
||||
@this.GetCapabilityEffectiveLabel(capability)
|
||||
</MudText>
|
||||
</MudStack>
|
||||
<MudStack Row="@true" AlignItems="AlignItems.Center" Spacing="2">
|
||||
<MudSwitch T="bool"
|
||||
Value="@this.IsCapabilityEnabled(capability)"
|
||||
ValueChanged="@(value => this.OnCapabilitySwitchChanged(capability, value))"
|
||||
Color="Color.Primary" />
|
||||
<MudButton Variant="Variant.Outlined"
|
||||
Color="Color.Default"
|
||||
Size="Size.Small"
|
||||
StartIcon="@Icons.Material.Filled.RestartAlt"
|
||||
Disabled="@(!this.HasCapabilityOverride(capability))"
|
||||
OnClick="@(() => this.ResetCapabilityOverride(capability))">
|
||||
@T("Reset")
|
||||
</MudButton>
|
||||
</MudStack>
|
||||
</MudStack>
|
||||
</MudPaper>
|
||||
}
|
||||
<MudPaper Outlined="@true" Class="pa-3">
|
||||
<MudSelect T="ReasoningOverrideMode"
|
||||
Value="@this.GetReasoningOverrideMode()"
|
||||
ValueChanged="@this.SetReasoningOverrideMode"
|
||||
Label="@T("Reasoning (thinking) behavior")"
|
||||
HelperText="@this.GetReasoningOverrideModeDescription(this.GetReasoningOverrideMode())"
|
||||
Variant="Variant.Outlined"
|
||||
Margin="Margin.Dense"
|
||||
OpenIcon="@Icons.Material.Filled.Psychology"
|
||||
AdornmentColor="Color.Info"
|
||||
Adornment="Adornment.Start">
|
||||
@foreach (var mode in REASONING_OVERRIDE_MODES)
|
||||
{
|
||||
<MudSelectItem Value="@mode">
|
||||
@this.GetReasoningOverrideModeLabel(mode)
|
||||
</MudSelectItem>
|
||||
}
|
||||
</MudSelect>
|
||||
</MudPaper>
|
||||
</MudStack>
|
||||
<MudJustifiedText Typo="Typo.body2" Class="mb-4">
|
||||
@string.Format(T("The current model uses the {0}."), this.GetCurrentModelApiLabel())
|
||||
</MudJustifiedText>
|
||||
<MudTextField T="string" Label=@T("Additional API parameters") Variant="Variant.Outlined" Lines="4" AutoGrow="true" MaxLines="10" HelperText=@T("""Add the parameters in proper JSON formatting, e.g., "temperature": 0.5. Remove trailing commas. The usual surrounding curly brackets {} must not be used, though.""") Placeholder="@GetPlaceholderExpertSettings" @bind-Value="@this.AdditionalJsonApiParameters" Immediate="true" Validation="@this.ValidateAdditionalJsonApiParameters" OnBlur="@this.OnInputChangeExpertSettings"/>
|
||||
</MudCollapse>
|
||||
|
||||
Reference in new issue
Block a user