mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-10 21:47:21 +00:00
Added the prompt guide to the settings of the Prompt Optimizer and to configuration plugins (#1165)
This commit is contained in:
1 parent
a3d38c5db4
commit
974244ae51
19 files changed
+290
-26
No files matched your search
@@ -202,7 +202,7 @@ public sealed class Data
|
||||
|
||||
public DataRewriteImprove RewriteImprove { get; set; } = new();
|
||||
|
||||
public DataPromptOptimizer PromptOptimizer { get; set; } = new();
|
||||
public DataPromptOptimizer PromptOptimizer { get; set; } = new(x => x.PromptOptimizer);
|
||||
|
||||
public DataEMail EMail { get; set; } = new();
|
||||
|
||||
|
||||
@@ -1,36 +1,59 @@
|
||||
using System.Linq.Expressions;
|
||||
|
||||
using AIStudio.Provider;
|
||||
|
||||
namespace AIStudio.Settings.DataModel;
|
||||
|
||||
public sealed class DataPromptOptimizer
|
||||
/// <summary>
|
||||
/// Stores the default options for the Prompt Optimizer.
|
||||
/// </summary>
|
||||
/// <param name="configSelection">The managed-configuration selector.</param>
|
||||
public sealed class DataPromptOptimizer(Expression<Func<Data, DataPromptOptimizer>>? configSelection = null)
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes an unmanaged Prompt Optimizer settings instance.
|
||||
/// </summary>
|
||||
public DataPromptOptimizer() : this(null)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Preselect prompt optimizer options?
|
||||
/// </summary>
|
||||
public bool PreselectOptions { get; set; }
|
||||
public bool PreselectOptions { get; set; } = ManagedConfiguration.Register(configSelection, value => value.PreselectOptions, false);
|
||||
|
||||
/// <summary>
|
||||
/// Preselect the target language?
|
||||
/// </summary>
|
||||
public CommonLanguages PreselectedTargetLanguage { get; set; } = CommonLanguages.AS_IS;
|
||||
public CommonLanguages PreselectedTargetLanguage { get; set; } = ManagedConfiguration.Register(configSelection, value => value.PreselectedTargetLanguage, CommonLanguages.AS_IS);
|
||||
|
||||
/// <summary>
|
||||
/// Preselect a custom target language when "Other" is selected?
|
||||
/// </summary>
|
||||
public string PreselectedOtherLanguage { get; set; } = string.Empty;
|
||||
public string PreselectedOtherLanguage { get; set; } = ManagedConfiguration.Register(configSelection, value => value.PreselectedOtherLanguage, string.Empty);
|
||||
|
||||
/// <summary>
|
||||
/// Preselect important aspects for the optimization.
|
||||
/// </summary>
|
||||
public string PreselectedImportantAspects { get; set; } = string.Empty;
|
||||
public string PreselectedImportantAspects { get; set; } = ManagedConfiguration.Register(configSelection, value => value.PreselectedImportantAspects, string.Empty);
|
||||
|
||||
/// <summary>
|
||||
/// The file with the prompt guide to preselect. An empty path preselects the default prompt guide.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The path names a file of the user and therefore stays absolute. A configuration plugin may give
|
||||
/// a path relative to itself, which is resolved before it lands here. The assistant reads the
|
||||
/// current content of the file whenever it applies the preselections.
|
||||
/// </remarks>
|
||||
public string PreselectedCustomPromptGuidePath { get; set; } = ManagedConfiguration.Register(configSelection, value => value.PreselectedCustomPromptGuidePath, string.Empty);
|
||||
|
||||
/// <summary>
|
||||
/// The minimum confidence level required for a provider to be considered.
|
||||
/// </summary>
|
||||
public ConfidenceLevel MinimumProviderConfidence { get; set; } = ConfidenceLevel.NONE;
|
||||
public ConfidenceLevel MinimumProviderConfidence { get; set; } = ManagedConfiguration.Register(configSelection, value => value.MinimumProviderConfidence, ConfidenceLevel.NONE);
|
||||
|
||||
/// <summary>
|
||||
/// Preselect a provider?
|
||||
/// </summary>
|
||||
public string PreselectedProvider { get; set; } = string.Empty;
|
||||
}
|
||||
public string PreselectedProvider { get; set; } = ManagedConfiguration.Register(configSelection, value => value.PreselectedProvider, string.Empty);
|
||||
}
|
||||
Reference in new issue
Block a user