mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-02-13 02:41:37 +00:00
Fixed a bug with non-running local transcription providers
This commit is contained in:
parent
839068ff34
commit
8107c97a6e
@ -149,31 +149,30 @@ public sealed class ProviderSelfHosted(Host host, string hostname) : BaseProvide
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override Task<IEnumerable<Provider.Model>> GetTranscriptionModels(string? apiKeyProvisional = null, CancellationToken token = default)
|
||||
public override async Task<IEnumerable<Provider.Model>> GetTranscriptionModels(string? apiKeyProvisional = null, CancellationToken token = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
switch (host)
|
||||
{
|
||||
case Host.WHISPER_CPP:
|
||||
return Task.FromResult<IEnumerable<Provider.Model>>(
|
||||
new List<Provider.Model>
|
||||
{
|
||||
new("loaded-model", TB("Model as configured by whisper.cpp")),
|
||||
});
|
||||
return new List<Provider.Model>
|
||||
{
|
||||
new("loaded-model", TB("Model as configured by whisper.cpp")),
|
||||
};
|
||||
|
||||
case Host.OLLAMA:
|
||||
case Host.VLLM:
|
||||
return this.LoadModels(SecretStoreType.TRANSCRIPTION_PROVIDER, [], [], token, apiKeyProvisional);
|
||||
return await this.LoadModels(SecretStoreType.TRANSCRIPTION_PROVIDER, [], [], token, apiKeyProvisional);
|
||||
|
||||
default:
|
||||
return Task.FromResult(Enumerable.Empty<Provider.Model>());
|
||||
return [];
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LOGGER.LogError(e, "Failed to load transcription models from self-hosted provider.");
|
||||
return Task.FromResult(Enumerable.Empty<Provider.Model>());
|
||||
LOGGER.LogError($"Failed to load transcription models from self-hosted provider: {e.Message}");
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
# v26.1.2, build 232 (2026-01-xx xx:xx UTC)
|
||||
- Added the option to hide specific assistants by configuration plugins. This is useful for enterprise environments in organizations.
|
||||
- Fixed a logging bug that prevented log events from being recorded in some cases.
|
||||
- Fixed a bug that allowed adding a provider without selecting a model.
|
||||
- Fixed a bug that allowed adding a provider without selecting a model.
|
||||
- Fixed a bug with local transcription providers by handling errors correctly when the local provider is unavailable.
|
||||
Loading…
Reference in New Issue
Block a user