mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-02-15 21: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 />
|
/// <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
|
try
|
||||||
{
|
{
|
||||||
switch (host)
|
switch (host)
|
||||||
{
|
{
|
||||||
case Host.WHISPER_CPP:
|
case Host.WHISPER_CPP:
|
||||||
return Task.FromResult<IEnumerable<Provider.Model>>(
|
return new List<Provider.Model>
|
||||||
new List<Provider.Model>
|
|
||||||
{
|
{
|
||||||
new("loaded-model", TB("Model as configured by whisper.cpp")),
|
new("loaded-model", TB("Model as configured by whisper.cpp")),
|
||||||
});
|
};
|
||||||
|
|
||||||
case Host.OLLAMA:
|
case Host.OLLAMA:
|
||||||
case Host.VLLM:
|
case Host.VLLM:
|
||||||
return this.LoadModels(SecretStoreType.TRANSCRIPTION_PROVIDER, [], [], token, apiKeyProvisional);
|
return await this.LoadModels(SecretStoreType.TRANSCRIPTION_PROVIDER, [], [], token, apiKeyProvisional);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return Task.FromResult(Enumerable.Empty<Provider.Model>());
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
LOGGER.LogError(e, "Failed to load transcription models from self-hosted provider.");
|
LOGGER.LogError($"Failed to load transcription models from self-hosted provider: {e.Message}");
|
||||||
return Task.FromResult(Enumerable.Empty<Provider.Model>());
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,3 +2,4 @@
|
|||||||
- Added the option to hide specific assistants by configuration plugins. This is useful for enterprise environments in organizations.
|
- 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 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