mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-14 07:53:48 +00:00
Fixed the transcription provider dialog not loading the stored API key for self-hosted providers other than Ollama
This commit is contained in:
1 parent
d21e09dd1e
commit
2f120e5fc0
1 file changed
+4
-12
@@ -198,18 +198,10 @@ public partial class TranscriptionProviderDialog : MSGComponentBase, ISecretId
|
|||||||
// When using self-hosted models, we must copy the model name:
|
// When using self-hosted models, we must copy the model name:
|
||||||
if (this.DataLLMProvider is LLMProviders.SELF_HOSTED)
|
if (this.DataLLMProvider is LLMProviders.SELF_HOSTED)
|
||||||
this.dataManuallyModel = this.DataModel.Id;
|
this.dataManuallyModel = this.DataModel.Id;
|
||||||
|
|
||||||
//
|
// Load the API key. Self-hosted providers may or may not need one (e.g., VLLM behind
|
||||||
// We cannot load the API key for self-hosted providers:
|
// an authenticated proxy does), so we always try -- ReloadModels() below relies on
|
||||||
//
|
// dataAPIKey already being populated, otherwise it would send an empty Bearer token:
|
||||||
if (this.DataLLMProvider is LLMProviders.SELF_HOSTED && this.DataHost is not Host.OLLAMA)
|
|
||||||
{
|
|
||||||
await this.ReloadModels();
|
|
||||||
await base.OnInitializedAsync();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Load the API key:
|
|
||||||
var requestedSecret = await this.RustService.GetAPIKey(this, SecretStoreType.TRANSCRIPTION_PROVIDER, isTrying: this.DataLLMProvider is LLMProviders.SELF_HOSTED);
|
var requestedSecret = await this.RustService.GetAPIKey(this, SecretStoreType.TRANSCRIPTION_PROVIDER, isTrying: this.DataLLMProvider is LLMProviders.SELF_HOSTED);
|
||||||
if (requestedSecret.Success)
|
if (requestedSecret.Success)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user