mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-08-11 23:12:10 +00:00
Simplified code
This commit is contained in:
parent
0a924825d7
commit
4a3c8992f4
@ -1,6 +1,7 @@
|
||||
@using AIStudio.Provider
|
||||
@using AIStudio.Provider.HuggingFace
|
||||
@using AIStudio.Provider.SelfHosted
|
||||
@using AIStudio.Settings
|
||||
@inherits MSGComponentBase
|
||||
<MudDialog>
|
||||
<DialogContent>
|
||||
@ -107,7 +108,7 @@
|
||||
{
|
||||
<MudSelect T="AIStudio.Provider.Model"
|
||||
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"
|
||||
Adornment="Adornment.Start" Validation="@this.providerValidation.ValidatingModel">
|
||||
@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.")
|
||||
</MudJustifiedText>
|
||||
<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">
|
||||
<MudStack Row="@true" AlignItems="AlignItems.Center" Justify="Justify.SpaceBetween" Wrap="Wrap.Wrap">
|
||||
|
||||
@ -610,14 +610,11 @@ public partial class ProviderDialog : MSGComponentBase, ISecretId
|
||||
}
|
||||
|
||||
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 =>
|
||||
"""
|
||||
"temperature": 0.5,
|
||||
"top_p": 0.9,
|
||||
"frequency_penalty": 0.0
|
||||
""";
|
||||
|
||||
}
|
||||
|
||||
@ -5,8 +5,6 @@ using AIStudio.Provider;
|
||||
|
||||
using Lua;
|
||||
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
using LuaTable = Lua.LuaTable;
|
||||
|
||||
namespace AIStudio.Settings;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user