mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-02-13 02:41:37 +00:00
Fixed bug when API could not be loaded
This commit is contained in:
parent
9eed4d950e
commit
7868e430ec
@ -25,7 +25,7 @@
|
||||
|
||||
@if (this.DataLLMProvider.IsAPIKeyNeeded(this.DataHost))
|
||||
{
|
||||
<SecretInputField @bind-Secret="@this.dataAPIKey" Label="@this.APIKeyText" Validation="@this.providerValidation.ValidatingAPIKey"/>
|
||||
<SecretInputField Secret="@this.dataAPIKey" SecretChanged="@this.OnAPIKeyChanged" Label="@this.APIKeyText" Validation="@this.providerValidation.ValidatingAPIKey"/>
|
||||
}
|
||||
|
||||
@if (this.DataLLMProvider.IsHostnameNeeded())
|
||||
|
||||
@ -240,6 +240,12 @@ public partial class EmbeddingProviderDialog : MSGComponentBase, ISecretId
|
||||
}
|
||||
|
||||
private void Cancel() => this.MudDialog.Cancel();
|
||||
|
||||
private void OnAPIKeyChanged(string apiKey)
|
||||
{
|
||||
this.dataAPIKey = apiKey;
|
||||
this.dataAPIKeyStorageIssue = string.Empty;
|
||||
}
|
||||
|
||||
private async Task ReloadModels()
|
||||
{
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
@if (this.DataLLMProvider.IsAPIKeyNeeded(this.DataHost))
|
||||
{
|
||||
<SecretInputField @bind-Secret="@this.dataAPIKey" Label="@this.APIKeyText" Validation="@this.providerValidation.ValidatingAPIKey"/>
|
||||
<SecretInputField Secret="@this.dataAPIKey" SecretChanged="@this.OnAPIKeyChanged" Label="@this.APIKeyText" Validation="@this.providerValidation.ValidatingAPIKey"/>
|
||||
}
|
||||
|
||||
@if (this.DataLLMProvider.IsHostnameNeeded())
|
||||
|
||||
@ -254,6 +254,12 @@ public partial class ProviderDialog : MSGComponentBase, ISecretId
|
||||
}
|
||||
|
||||
private void Cancel() => this.MudDialog.Cancel();
|
||||
|
||||
private void OnAPIKeyChanged(string apiKey)
|
||||
{
|
||||
this.dataAPIKey = apiKey;
|
||||
this.dataAPIKeyStorageIssue = string.Empty;
|
||||
}
|
||||
|
||||
private async Task ReloadModels()
|
||||
{
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
@if (this.DataLLMProvider.IsAPIKeyNeeded(this.DataHost))
|
||||
{
|
||||
<SecretInputField @bind-Secret="@this.dataAPIKey" Label="@this.APIKeyText" Validation="@this.providerValidation.ValidatingAPIKey"/>
|
||||
<SecretInputField Secret="@this.dataAPIKey" SecretChanged="@this.OnAPIKeyChanged" Label="@this.APIKeyText" Validation="@this.providerValidation.ValidatingAPIKey"/>
|
||||
}
|
||||
|
||||
@if (this.DataLLMProvider.IsHostnameNeeded())
|
||||
|
||||
@ -248,6 +248,12 @@ public partial class TranscriptionProviderDialog : MSGComponentBase, ISecretId
|
||||
}
|
||||
|
||||
private void Cancel() => this.MudDialog.Cancel();
|
||||
|
||||
private void OnAPIKeyChanged(string apiKey)
|
||||
{
|
||||
this.dataAPIKey = apiKey;
|
||||
this.dataAPIKeyStorageIssue = string.Empty;
|
||||
}
|
||||
|
||||
private async Task ReloadModels()
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user