From ca7d82a220b9d999c0f8e5f7ff1ca4071a67eefb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peer=20Sch=C3=BCtt?= <20603780+peerschuett@users.noreply.github.com> Date: Fri, 11 Apr 2025 13:54:03 +0200 Subject: [PATCH] Provider dialog shows the relevant fields dynamically --- .../Settings/SettingsPanelProviders.razor | 2 +- .../Dialogs/ProviderDialog.razor | 66 +++++++++++-------- 2 files changed, 39 insertions(+), 29 deletions(-) diff --git a/app/MindWork AI Studio/Components/Settings/SettingsPanelProviders.razor b/app/MindWork AI Studio/Components/Settings/SettingsPanelProviders.razor index 51db26b4..9ab1a81c 100644 --- a/app/MindWork AI Studio/Components/Settings/SettingsPanelProviders.razor +++ b/app/MindWork AI Studio/Components/Settings/SettingsPanelProviders.razor @@ -29,7 +29,7 @@ @context.Num @context.InstanceName - @context.UsedLLMProvider + @context.UsedLLMProvider.ToName() @if (context.UsedLLMProvider is not LLMProviders.SELF_HOSTED) { diff --git a/app/MindWork AI Studio/Dialogs/ProviderDialog.razor b/app/MindWork AI Studio/Dialogs/ProviderDialog.razor index 240bfff4..39fec695 100644 --- a/app/MindWork AI Studio/Dialogs/ProviderDialog.razor +++ b/app/MindWork AI Studio/Dialogs/ProviderDialog.razor @@ -29,34 +29,44 @@ InputType="InputType.Password" Validation="@this.providerValidation.ValidatingAPIKey" /> - - - - @foreach (Host host in Enum.GetValues(typeof(Host))) - { - @host.Name() - } - - - - @foreach (HFInstanceProvider instanceProvider in Enum.GetValues(typeof(HFInstanceProvider))) - { - @instanceProvider.ToName() - } - - + @if (this.DataLLMProvider.IsHostnameNeeded()) + { + + } + + @if (this.DataLLMProvider.IsHostNeeded()) + { + + @foreach (Host host in Enum.GetValues(typeof(Host))) + { + @host.Name() + } + + } + + @if (this.DataLLMProvider.IsHFInstanceProviderNeeded()) + { + + @foreach (HFInstanceProvider instanceProvider in Enum.GetValues(typeof(HFInstanceProvider))) + { + @instanceProvider.ToName() + } + + + Please double-check if your model name matches the curl specifications provided by the instance provider. If it doesn't, you might get a Not Found error when trying to use the model. Here's a curl example. + } + @if (this.DataLLMProvider.IsLLMModelProvidedManually()) { @@ -67,7 +77,7 @@ Label="Model" Class="mb-3" Adornment="Adornment.Start" - AdornmentIcon="@Icons.Material.Filled.Dns" + AdornmentIcon="@Icons.Material.Filled.FaceRetouchingNatural" AdornmentColor="Color.Info" Validation="@this.ValidateManuallyModel" UserAttributes="@SPELLCHECK_ATTRIBUTES"