mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-08-11 17:32:11 +00:00
Remove batch processing profiles
This commit is contained in:
parent
c8c336cf7a
commit
59c952e7d4
@ -1,5 +1,6 @@
|
|||||||
using AIStudio.Chat;
|
using AIStudio.Chat;
|
||||||
using AIStudio.Provider;
|
using AIStudio.Provider;
|
||||||
|
using AIStudio.Settings;
|
||||||
|
|
||||||
namespace AIStudio.Assistants.BatchProcessing;
|
namespace AIStudio.Assistants.BatchProcessing;
|
||||||
|
|
||||||
@ -91,7 +92,7 @@ public partial class AssistantBatchProcessing
|
|||||||
{
|
{
|
||||||
IncludeDateTime = false,
|
IncludeDateTime = false,
|
||||||
SelectedProvider = this.ProviderSettings.Id,
|
SelectedProvider = this.ProviderSettings.Id,
|
||||||
SelectedProfile = this.CurrentProfile.Id,
|
SelectedProfile = Profile.NO_PROFILE.Id,
|
||||||
SystemPrompt = this.SystemPrompt,
|
SystemPrompt = this.SystemPrompt,
|
||||||
WorkspaceId = Guid.Empty,
|
WorkspaceId = Guid.Empty,
|
||||||
ChatId = Guid.NewGuid(),
|
ChatId = Guid.NewGuid(),
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
using AIStudio.Dialogs.Settings;
|
using AIStudio.Dialogs.Settings;
|
||||||
using AIStudio.Provider;
|
using AIStudio.Provider;
|
||||||
using AIStudio.Settings;
|
|
||||||
using AIStudio.Settings.DataModel;
|
using AIStudio.Settings.DataModel;
|
||||||
|
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
@ -40,7 +39,7 @@ public partial class AssistantBatchProcessing : AssistantBaseCore<SettingsDialog
|
|||||||
|
|
||||||
protected override bool ShowResult => false;
|
protected override bool ShowResult => false;
|
||||||
|
|
||||||
protected override bool AllowProfiles => true;
|
protected override bool AllowProfiles => false;
|
||||||
|
|
||||||
protected override bool ShowSendTo => false;
|
protected override bool ShowSendTo => false;
|
||||||
|
|
||||||
@ -236,27 +235,5 @@ public partial class AssistantBatchProcessing : AssistantBaseCore<SettingsDialog
|
|||||||
? fallbackProvider
|
? fallbackProvider
|
||||||
: Settings.Provider.NONE;
|
: Settings.Provider.NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.CurrentProfile = this.ResolvePolicyProfile();
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
private Profile ResolvePolicyProfile()
|
|
||||||
{
|
|
||||||
if (this.selectedPolicy is null)
|
|
||||||
return this.SettingsManager.GetPreselectedProfile(this.Component);
|
|
||||||
|
|
||||||
var policyProfile = ProfilePreselection.FromStoredValue(this.selectedPolicy.PreselectedProfile);
|
|
||||||
if (policyProfile.DoNotPreselectProfile)
|
|
||||||
return Profile.NO_PROFILE;
|
|
||||||
|
|
||||||
if (policyProfile.UseSpecificProfile)
|
|
||||||
{
|
|
||||||
var profile = this.SettingsManager.ConfigurationData.Profiles
|
|
||||||
.FirstOrDefault(candidate => candidate.Id == policyProfile.SpecificProfileId);
|
|
||||||
if (profile is not null)
|
|
||||||
return profile;
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.SettingsManager.GetPreselectedProfile(this.Component);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@ -49,7 +49,6 @@
|
|||||||
<MudText Typo="Typo.h6" Class="mb-3 mt-6">@T("AI selection")</MudText>
|
<MudText Typo="Typo.h6" Class="mb-3 mt-6">@T("AI selection")</MudText>
|
||||||
<ConfigurationMinConfidenceSelection Disabled="@this.DefaultsDisabled" RestrictToGlobalMinimumConfidence="true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.BatchProcessing.MinimumProviderConfidence)" SelectionUpdate="@(value => this.SettingsManager.ConfigurationData.BatchProcessing.MinimumProviderConfidence = value)" IsLocked="() => ManagedConfiguration.TryGet(x => x.BatchProcessing, x => x.MinimumProviderConfidence, out var meta) && meta.IsLocked"/>
|
<ConfigurationMinConfidenceSelection Disabled="@this.DefaultsDisabled" RestrictToGlobalMinimumConfidence="true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.BatchProcessing.MinimumProviderConfidence)" SelectionUpdate="@(value => this.SettingsManager.ConfigurationData.BatchProcessing.MinimumProviderConfidence = value)" IsLocked="() => ManagedConfiguration.TryGet(x => x.BatchProcessing, x => x.MinimumProviderConfidence, out var meta) && meta.IsLocked"/>
|
||||||
<ConfigurationProviderSelection Component="Components.BATCH_PROCESSING_ASSISTANT" Data="@this.AvailableLLMProviders" Disabled="@this.DefaultsDisabled" SelectedValue="@(() => this.SettingsManager.ConfigurationData.BatchProcessing.PreselectedProvider)" SelectionUpdate="@(value => this.SettingsManager.ConfigurationData.BatchProcessing.PreselectedProvider = value)" IsLocked="() => ManagedConfiguration.TryGet(x => x.BatchProcessing, x => x.PreselectedProvider, out var meta) && meta.IsLocked"/>
|
<ConfigurationProviderSelection Component="Components.BATCH_PROCESSING_ASSISTANT" Data="@this.AvailableLLMProviders" Disabled="@this.DefaultsDisabled" SelectedValue="@(() => this.SettingsManager.ConfigurationData.BatchProcessing.PreselectedProvider)" SelectionUpdate="@(value => this.SettingsManager.ConfigurationData.BatchProcessing.PreselectedProvider = value)" IsLocked="() => ManagedConfiguration.TryGet(x => x.BatchProcessing, x => x.PreselectedProvider, out var meta) && meta.IsLocked"/>
|
||||||
<ConfigurationSelect OptionDescription="@T("Default profile")" Disabled="@this.DefaultsDisabled" SelectedValue="@(() => ProfilePreselection.FromStoredValue(this.SettingsManager.ConfigurationData.BatchProcessing.PreselectedProfile))" Data="@ConfigurationSelectDataFactory.GetComponentProfilesData(this.SettingsManager.ConfigurationData.Profiles)" SelectionUpdate="@(value => this.SettingsManager.ConfigurationData.BatchProcessing.PreselectedProfile = value)" OptionHelp="@T("Choose whether batch runs should use the app default profile, no profile, or a specific profile.")" IsLocked="() => ManagedConfiguration.TryGet(x => x.BatchProcessing, x => x.PreselectedProfile, out var meta) && meta.IsLocked"/>
|
|
||||||
</MudPaper>
|
</MudPaper>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
|
|||||||
@ -425,13 +425,11 @@ CONFIG["SETTINGS"] = {}
|
|||||||
-- CONFIG["SETTINGS"]["DataBatchProcessing.CsvFileName"] = "batch-results.csv"
|
-- CONFIG["SETTINGS"]["DataBatchProcessing.CsvFileName"] = "batch-results.csv"
|
||||||
-- CONFIG["SETTINGS"]["DataBatchProcessing.ResultColumnHeader"] = "Result"
|
-- CONFIG["SETTINGS"]["DataBatchProcessing.ResultColumnHeader"] = "Result"
|
||||||
--
|
--
|
||||||
-- Configure the minimum provider confidence and the default provider and profile.
|
-- Configure the minimum provider confidence and the default provider.
|
||||||
-- Allowed confidence values are: NONE, UNTRUSTED, UNKNOWN, VERY_LOW, LOW, MODERATE, MEDIUM, HIGH
|
-- Allowed confidence values are: NONE, UNTRUSTED, UNKNOWN, VERY_LOW, LOW, MODERATE, MEDIUM, HIGH
|
||||||
-- A policy can require a higher minimum confidence; the stricter level wins.
|
-- A policy can require a higher minimum confidence; the stricter level wins.
|
||||||
-- CONFIG["SETTINGS"]["DataBatchProcessing.MinimumProviderConfidence"] = "NONE"
|
-- CONFIG["SETTINGS"]["DataBatchProcessing.MinimumProviderConfidence"] = "NONE"
|
||||||
-- CONFIG["SETTINGS"]["DataBatchProcessing.PreselectedProvider"] = "00000000-0000-0000-0000-000000000000"
|
-- CONFIG["SETTINGS"]["DataBatchProcessing.PreselectedProvider"] = "00000000-0000-0000-0000-000000000000"
|
||||||
-- Please note: an empty profile ID uses the app default profile; the all-zero ID uses no profile.
|
|
||||||
-- CONFIG["SETTINGS"]["DataBatchProcessing.PreselectedProfile"] = ""
|
|
||||||
--
|
--
|
||||||
-- Allow users to change individual managed batch defaults locally.
|
-- Allow users to change individual managed batch defaults locally.
|
||||||
-- CONFIG["SETTINGS"]["DataBatchProcessing.PreselectOptions.AllowUserOverride"] = true
|
-- CONFIG["SETTINGS"]["DataBatchProcessing.PreselectOptions.AllowUserOverride"] = true
|
||||||
@ -448,7 +446,6 @@ CONFIG["SETTINGS"] = {}
|
|||||||
-- CONFIG["SETTINGS"]["DataBatchProcessing.ResultColumnHeader.AllowUserOverride"] = true
|
-- CONFIG["SETTINGS"]["DataBatchProcessing.ResultColumnHeader.AllowUserOverride"] = true
|
||||||
-- CONFIG["SETTINGS"]["DataBatchProcessing.MinimumProviderConfidence.AllowUserOverride"] = true
|
-- CONFIG["SETTINGS"]["DataBatchProcessing.MinimumProviderConfidence.AllowUserOverride"] = true
|
||||||
-- CONFIG["SETTINGS"]["DataBatchProcessing.PreselectedProvider.AllowUserOverride"] = true
|
-- CONFIG["SETTINGS"]["DataBatchProcessing.PreselectedProvider.AllowUserOverride"] = true
|
||||||
-- CONFIG["SETTINGS"]["DataBatchProcessing.PreselectedProfile.AllowUserOverride"] = true
|
|
||||||
|
|
||||||
-- Configure the transcription provider for voice-to-text functionality.
|
-- Configure the transcription provider for voice-to-text functionality.
|
||||||
-- It must be one of the transcription provider IDs defined in CONFIG["TRANSCRIPTION_PROVIDERS"].
|
-- It must be one of the transcription provider IDs defined in CONFIG["TRANSCRIPTION_PROVIDERS"].
|
||||||
|
|||||||
@ -47,6 +47,4 @@ public sealed class DataBatchProcessing(Expression<Func<Data, DataBatchProcessin
|
|||||||
public ConfidenceLevel MinimumProviderConfidence { get; set; } = ManagedConfiguration.Register(configSelection, value => value.MinimumProviderConfidence, ConfidenceLevel.NONE);
|
public ConfidenceLevel MinimumProviderConfidence { get; set; } = ManagedConfiguration.Register(configSelection, value => value.MinimumProviderConfidence, ConfidenceLevel.NONE);
|
||||||
|
|
||||||
public string PreselectedProvider { get; set; } = ManagedConfiguration.Register(configSelection, value => value.PreselectedProvider, string.Empty);
|
public string PreselectedProvider { get; set; } = ManagedConfiguration.Register(configSelection, value => value.PreselectedProvider, string.Empty);
|
||||||
|
|
||||||
public string PreselectedProfile { get; set; } = ManagedConfiguration.Register(configSelection, value => value.PreselectedProfile, string.Empty);
|
|
||||||
}
|
}
|
||||||
@ -220,7 +220,6 @@ public static class ComponentsExtensions
|
|||||||
Components.ERI_ASSISTANT => settingsManager.ConfigurationData.ERI.PreselectOptions ? settingsManager.ConfigurationData.ERI.PreselectedProfile : string.Empty,
|
Components.ERI_ASSISTANT => settingsManager.ConfigurationData.ERI.PreselectOptions ? settingsManager.ConfigurationData.ERI.PreselectedProfile : string.Empty,
|
||||||
Components.SLIDE_BUILDER_ASSISTANT => settingsManager.ConfigurationData.SlideBuilder.PreselectOptions ? settingsManager.ConfigurationData.SlideBuilder.PreselectedProfile : string.Empty,
|
Components.SLIDE_BUILDER_ASSISTANT => settingsManager.ConfigurationData.SlideBuilder.PreselectOptions ? settingsManager.ConfigurationData.SlideBuilder.PreselectedProfile : string.Empty,
|
||||||
Components.VISUAL_BRIEFING_ASSISTANT => settingsManager.ConfigurationData.VisualBriefing.PreselectedProfile,
|
Components.VISUAL_BRIEFING_ASSISTANT => settingsManager.ConfigurationData.VisualBriefing.PreselectedProfile,
|
||||||
Components.BATCH_PROCESSING_ASSISTANT => settingsManager.ConfigurationData.BatchProcessing.PreselectOptions ? settingsManager.ConfigurationData.BatchProcessing.PreselectedProfile : string.Empty,
|
|
||||||
Components.CHAT => settingsManager.ConfigurationData.Chat.PreselectOptions ? settingsManager.ConfigurationData.Chat.PreselectedProfile : string.Empty,
|
Components.CHAT => settingsManager.ConfigurationData.Chat.PreselectOptions ? settingsManager.ConfigurationData.Chat.PreselectedProfile : string.Empty,
|
||||||
|
|
||||||
// The Document Analysis Assistant does not have a preselected profile at the component level.
|
// The Document Analysis Assistant does not have a preselected profile at the component level.
|
||||||
|
|||||||
@ -352,7 +352,6 @@ public sealed class PluginConfiguration(bool isInternal, LuaState state, PluginT
|
|||||||
ManagedConfiguration.TryProcessConfiguration(x => x.BatchProcessing, x => x.ResultColumnHeader, this.Id, settingsTable, dryRun);
|
ManagedConfiguration.TryProcessConfiguration(x => x.BatchProcessing, x => x.ResultColumnHeader, this.Id, settingsTable, dryRun);
|
||||||
ManagedConfiguration.TryProcessConfiguration(x => x.BatchProcessing, x => x.MinimumProviderConfidence, this.Id, settingsTable, dryRun);
|
ManagedConfiguration.TryProcessConfiguration(x => x.BatchProcessing, x => x.MinimumProviderConfidence, this.Id, settingsTable, dryRun);
|
||||||
ManagedConfiguration.TryProcessConfiguration(x => x.BatchProcessing, x => x.PreselectedProvider, Guid.Empty, this.Id, settingsTable, dryRun);
|
ManagedConfiguration.TryProcessConfiguration(x => x.BatchProcessing, x => x.PreselectedProvider, Guid.Empty, this.Id, settingsTable, dryRun);
|
||||||
ManagedConfiguration.TryProcessConfiguration(x => x.BatchProcessing, x => x.PreselectedProfile, this.Id, settingsTable, dryRun);
|
|
||||||
|
|
||||||
// Config: transcription provider?
|
// Config: transcription provider?
|
||||||
ManagedConfiguration.TryProcessConfiguration(x => x.App, x => x.UseTranscriptionProvider, Guid.Empty, this.Id, settingsTable, dryRun);
|
ManagedConfiguration.TryProcessConfiguration(x => x.App, x => x.UseTranscriptionProvider, Guid.Empty, this.Id, settingsTable, dryRun);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user