Fixed the issue that to load the model list, an instance was necessary

This commit is contained in:
Thorsten Sommer 2024-07-02 20:46:33 +02:00
parent 44a2855005
commit fb6092c548
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -217,11 +217,11 @@ public partial class ProviderDialog : ComponentBase
private void Cancel() => this.MudDialog.Cancel(); private void Cancel() => this.MudDialog.Cancel();
private bool CanLoadModels => !string.IsNullOrWhiteSpace(this.dataAPIKey) && this.DataProvider != Providers.NONE && !string.IsNullOrWhiteSpace(this.DataInstanceName); private bool CanLoadModels => !string.IsNullOrWhiteSpace(this.dataAPIKey) && this.DataProvider != Providers.NONE;
private async Task ReloadModels() private async Task ReloadModels()
{ {
var provider = this.DataProvider.CreateProvider(this.DataInstanceName); var provider = this.DataProvider.CreateProvider("temp");
if(provider is NoProvider) if(provider is NoProvider)
return; return;