mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-02-15 23:41:36 +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())
|
||||
|
||||
@ -241,6 +241,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()
|
||||
{
|
||||
var currentEmbeddingProviderSettings = this.CreateEmbeddingProviderSettings();
|
||||
|
||||
@ -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())
|
||||
|
||||
@ -255,6 +255,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()
|
||||
{
|
||||
var currentProviderSettings = this.CreateProviderSettings();
|
||||
|
||||
@ -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())
|
||||
|
||||
@ -249,6 +249,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()
|
||||
{
|
||||
var currentTranscriptionProviderSettings = this.CreateTranscriptionProviderSettings();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user