Simplified code

This commit is contained in:
Thorsten Sommer 2026-07-04 22:13:01 +02:00
parent 0a924825d7
commit 4a3c8992f4
Signed by untrusted user who does not match committer: tsommer
GPG Key ID: 371BBA77A02C0108
3 changed files with 4 additions and 8 deletions

View File

@ -1,6 +1,7 @@
@using AIStudio.Provider @using AIStudio.Provider
@using AIStudio.Provider.HuggingFace @using AIStudio.Provider.HuggingFace
@using AIStudio.Provider.SelfHosted @using AIStudio.Provider.SelfHosted
@using AIStudio.Settings
@inherits MSGComponentBase @inherits MSGComponentBase
<MudDialog> <MudDialog>
<DialogContent> <DialogContent>
@ -107,7 +108,7 @@
{ {
<MudSelect T="AIStudio.Provider.Model" <MudSelect T="AIStudio.Provider.Model"
Value="@this.DataModel" Value="@this.DataModel"
ValueChanged="@(async (AIStudio.Provider.Model model) => await this.OnModelChanged(model))" ValueChanged="@(async model => await this.OnModelChanged(model))"
OpenIcon="@Icons.Material.Filled.FaceRetouchingNatural" AdornmentColor="Color.Info" OpenIcon="@Icons.Material.Filled.FaceRetouchingNatural" AdornmentColor="Color.Info"
Adornment="Adornment.Start" Validation="@this.providerValidation.ValidatingModel"> Adornment="Adornment.Start" Validation="@this.providerValidation.ValidatingModel">
@foreach (var model in this.availableModels) @foreach (var model in this.availableModels)
@ -169,7 +170,7 @@
@T("Stored default model capabilities may not reflect its full range. Override them here if needed.") @T("Stored default model capabilities may not reflect its full range. Override them here if needed.")
</MudJustifiedText> </MudJustifiedText>
<MudStack Class="mb-4" Spacing="2"> <MudStack Class="mb-4" Spacing="2">
@foreach (var capability in this.ExpertCapabilityOverrides) @foreach (var capability in ProviderCapabilityOverrides.SUPPORTED_CAPABILITIES)
{ {
<MudPaper Outlined="@true" Class="pa-3"> <MudPaper Outlined="@true" Class="pa-3">
<MudStack Row="@true" AlignItems="AlignItems.Center" Justify="Justify.SpaceBetween" Wrap="Wrap.Wrap"> <MudStack Row="@true" AlignItems="AlignItems.Center" Justify="Justify.SpaceBetween" Wrap="Wrap.Wrap">

View File

@ -611,13 +611,10 @@ public partial class ProviderDialog : MSGComponentBase, ISecretId
private string GetExpertStyles => this.showExpertSettings ? "border-2 border-dashed rounded pa-2" : string.Empty; private string GetExpertStyles => this.showExpertSettings ? "border-2 border-dashed rounded pa-2" : string.Empty;
private IReadOnlyList<Capability> ExpertCapabilityOverrides => ProviderCapabilityOverrides.SUPPORTED_CAPABILITIES;
private static string GetPlaceholderExpertSettings => private static string GetPlaceholderExpertSettings =>
""" """
"temperature": 0.5, "temperature": 0.5,
"top_p": 0.9, "top_p": 0.9,
"frequency_penalty": 0.0 "frequency_penalty": 0.0
"""; """;
} }

View File

@ -5,8 +5,6 @@ using AIStudio.Provider;
using Lua; using Lua;
using Microsoft.Extensions.Logging;
using LuaTable = Lua.LuaTable; using LuaTable = Lua.LuaTable;
namespace AIStudio.Settings; namespace AIStudio.Settings;