mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-05 20:47:21 +00:00
Added a way for organizations to prohibit providers (#1105)
This commit is contained in:
1 parent
052868b24e
commit
7ba5f01388
38 files changed
+1488
-629
No files matched your search
@@ -754,10 +754,11 @@ public sealed class MediaTranscriptionService(
|
||||
|
||||
/// <summary>Resolves the configured provider after confidence validation.</summary>
|
||||
/// <remarks>
|
||||
/// Checks the global minimum confidence only. A caller with rules of its own, such as the
|
||||
/// confidence level of a data source, checks the provider against them as well.
|
||||
/// Checks the global minimum confidence and whether the organization prohibited the provider. A
|
||||
/// caller with rules of its own, such as the confidence level of a data source, checks the
|
||||
/// provider against them as well.
|
||||
/// </remarks>
|
||||
/// <returns>The configured provider, or null when none is configured or it falls short of the global minimum.</returns>
|
||||
/// <returns>The configured provider, or null when none is configured, it falls short of the global minimum, or it is prohibited.</returns>
|
||||
public TranscriptionProvider? GetUsableProvider()
|
||||
{
|
||||
var providerId = settingsManager.ConfigurationData.App.UseTranscriptionProvider;
|
||||
@@ -769,7 +770,7 @@ public sealed class MediaTranscriptionService(
|
||||
return null;
|
||||
|
||||
var minimumLevel = settingsManager.GetMinimumConfidenceLevel(Components.NONE);
|
||||
return providerSettings.UsedLLMProvider.GetConfidence(settingsManager).Level >= minimumLevel
|
||||
return settingsManager.IsProviderUsable(providerSettings.UsedLLMProvider, minimumLevel)
|
||||
? providerSettings
|
||||
: null;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user