mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-10 17:27: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
@@ -2278,6 +2278,9 @@ UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::PROMPTOPTIMIZER::ASSISTANTPROMPTOPTIMIZER
|
||||
-- Optimize prompt
|
||||
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::PROMPTOPTIMIZER::ASSISTANTPROMPTOPTIMIZER::T1857716344"] = "Optimize prompt"
|
||||
|
||||
-- The prompt guide of your organization could not be loaded.
|
||||
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::PROMPTOPTIMIZER::ASSISTANTPROMPTOPTIMIZER::T1909702735"] = "The prompt guide of your organization could not be loaded."
|
||||
|
||||
-- Break the task into numbered steps if order matters.
|
||||
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::PROMPTOPTIMIZER::ASSISTANTPROMPTOPTIMIZER::T2185953360"] = "Break the task into numbered steps if order matters."
|
||||
|
||||
@@ -2293,6 +2296,9 @@ UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::PROMPTOPTIMIZER::ASSISTANTPROMPTOPTIMIZER
|
||||
-- Use an LLM to optimize your prompt by following either the default or your individual prompt guidelines and get targeted recommendations for future versions of the prompt.
|
||||
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::PROMPTOPTIMIZER::ASSISTANTPROMPTOPTIMIZER::T2466607250"] = "Use an LLM to optimize your prompt by following either the default or your individual prompt guidelines and get targeted recommendations for future versions of the prompt."
|
||||
|
||||
-- Use the prompt recommendations from the prompt guide of your organization.
|
||||
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::PROMPTOPTIMIZER::ASSISTANTPROMPTOPTIMIZER::T2660819035"] = "Use the prompt recommendations from the prompt guide of your organization."
|
||||
|
||||
-- Replaced the previously selected custom prompt guide file.
|
||||
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::PROMPTOPTIMIZER::ASSISTANTPROMPTOPTIMIZER::T2698103422"] = "Replaced the previously selected custom prompt guide file."
|
||||
|
||||
@@ -7213,6 +7219,9 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::DATARESTOREREPORTDIALOG::T3430781520"] = "En
|
||||
-- Technical details: {0}
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::DATARESTOREREPORTDIALOG::T3436390766"] = "Technical details: {0}"
|
||||
|
||||
-- The Prompt Optimizer uses the prompt guide '{0}', which does not exist on this computer.
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::DATARESTOREREPORTDIALOG::T3445391882"] = "The Prompt Optimizer uses the prompt guide '{0}', which does not exist on this computer."
|
||||
|
||||
-- Close
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::DATARESTOREREPORTDIALOG::T3448155331"] = "Close"
|
||||
|
||||
@@ -10045,12 +10054,18 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGPROFILES::T55364659"
|
||||
-- Are you a project manager in a research facility? You might want to create a profile for your project management activities, one for your scientific work, and a profile for when you need to write program code. In these profiles, you can record how much experience you have or which methods you like or dislike using. Later, you can choose when and where you want to use each profile.
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGPROFILES::T56359901"] = "Are you a project manager in a research facility? You might want to create a profile for your project management activities, one for your scientific work, and a profile for when you need to write program code. In these profiles, you can record how much experience you have or which methods you like or dislike using. Later, you can choose when and where you want to use each profile."
|
||||
|
||||
-- Preselect a custom prompt guide
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGPROMPTOPTIMIZER::T1075392178"] = "Preselect a custom prompt guide"
|
||||
|
||||
-- Preselect the target language
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGPROMPTOPTIMIZER::T1417990312"] = "Preselect the target language"
|
||||
|
||||
-- Preselect another target language
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGPROMPTOPTIMIZER::T1462295644"] = "Preselect another target language"
|
||||
|
||||
-- Leave this empty to use the default prompt guide. The assistant loads the current content of this file whenever it applies your preselections.
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGPROMPTOPTIMIZER::T155885829"] = "Leave this empty to use the default prompt guide. The assistant loads the current content of this file whenever it applies your preselections."
|
||||
|
||||
-- Assistant: Prompt Optimizer Options
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGPROMPTOPTIMIZER::T2309650422"] = "Assistant: Prompt Optimizer Options"
|
||||
|
||||
@@ -10078,6 +10093,9 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGPROMPTOPTIMIZER::T35
|
||||
-- Preselect important aspects
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGPROMPTOPTIMIZER::T3705987833"] = "Preselect important aspects"
|
||||
|
||||
-- Select a prompt guide
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGPROMPTOPTIMIZER::T4252279140"] = "Select a prompt guide"
|
||||
|
||||
-- Which writing style should be preselected?
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGREWRITE::T1173034744"] = "Which writing style should be preselected?"
|
||||
|
||||
|
||||
@@ -79,7 +79,11 @@
|
||||
</MudGrid>
|
||||
}
|
||||
|
||||
@if (this.useCustomPromptGuide)
|
||||
@if (this.useCustomPromptGuide && this.IsCustomPromptGuideLocked)
|
||||
{
|
||||
<MudJustifiedText Class="mb-3">@T("Use the prompt recommendations from the prompt guide of your organization.")</MudJustifiedText>
|
||||
}
|
||||
else if (this.useCustomPromptGuide)
|
||||
{
|
||||
<MudJustifiedText Class="mb-3">@T("Use the prompt recommendations from the custom prompt guide.")</MudJustifiedText>
|
||||
}
|
||||
@@ -91,7 +95,7 @@
|
||||
@T("View default prompt guide")
|
||||
</MudButton>
|
||||
|
||||
<MudSwitch T="bool" Value="@this.useCustomPromptGuide" ValueChanged="@this.SetUseCustomPromptGuide" Color="Color.Primary" Class="mx-1">
|
||||
<MudSwitch T="bool" Value="@this.useCustomPromptGuide" ValueChanged="@this.SetUseCustomPromptGuide" Disabled="@this.IsCustomPromptGuideLocked" Color="Color.Primary" Class="mx-1">
|
||||
@T("Use custom prompt guide")
|
||||
</MudSwitch>
|
||||
|
||||
@@ -112,7 +116,7 @@
|
||||
</MudButton>
|
||||
</MudStack>
|
||||
|
||||
@if (this.useCustomPromptGuide)
|
||||
@if (this.useCustomPromptGuide && !this.IsCustomPromptGuideLocked)
|
||||
{
|
||||
<ReadFileContent Text="@T("Load the prompt guide from file")"
|
||||
@bind-FileContent="@this.customPromptingGuidelineContent"
|
||||
|
||||
+80
-7
@@ -3,6 +3,7 @@ using System.Text.Json;
|
||||
using AIStudio.Chat;
|
||||
using AIStudio.Dialogs;
|
||||
using AIStudio.Dialogs.Settings;
|
||||
using AIStudio.Settings;
|
||||
using AIStudio.Tools.AssistantLaunch;
|
||||
using AIStudio.Tools.AssistantSessions;
|
||||
using AIStudio.Tools.Rust;
|
||||
@@ -133,10 +134,7 @@ public partial class AssistantPromptOptimizer : AssistantBaseCore<SettingsDialog
|
||||
protected override void ResetForm()
|
||||
{
|
||||
this.inputPrompt = string.Empty;
|
||||
this.useCustomPromptGuide = false;
|
||||
this.customPromptGuideFiles.Clear();
|
||||
this.currentCustomPromptGuidePath = string.Empty;
|
||||
this.customPromptingGuidelineContent = string.Empty;
|
||||
this.ClearCustomPromptGuide();
|
||||
this.hasUpdatedDefaultRecommendations = false;
|
||||
this.ResetGuidelineSummaryToDefault();
|
||||
this.ResetOutput();
|
||||
@@ -157,9 +155,65 @@ public partial class AssistantPromptOptimizer : AssistantBaseCore<SettingsDialog
|
||||
this.selectedTargetLanguage = this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectedTargetLanguage;
|
||||
this.customTargetLanguage = this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectedOtherLanguage;
|
||||
this.importantAspects = this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectedImportantAspects;
|
||||
this.PreselectCustomPromptGuide();
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads the preselected prompt guide, now that the preselections are in place.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The guide is read anew whenever the preselections are applied, i.e., when the assistant opens
|
||||
/// and when the form is reset. That way, a change to the file reaches the next optimization
|
||||
/// without anybody having to choose the file again.
|
||||
/// </remarks>
|
||||
protected override async Task OnDefaultsAppliedAsync()
|
||||
{
|
||||
if (!this.useCustomPromptGuide || this.customPromptGuideFiles.Count == 0)
|
||||
return;
|
||||
|
||||
await this.LoadCustomPromptGuidelineContentAsync(this.customPromptGuideFiles.First());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Takes the prompt guide of the settings as the custom prompt guide, if the settings name one.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Only the file is taken here. Its content follows in OnDefaultsAppliedAsync, because reading it
|
||||
/// is asynchronous, while the preselections are not. Content read before stays as long as the file
|
||||
/// is the same.
|
||||
/// </remarks>
|
||||
private void PreselectCustomPromptGuide()
|
||||
{
|
||||
var guidePath = this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectedCustomPromptGuidePath;
|
||||
if (string.IsNullOrWhiteSpace(guidePath))
|
||||
{
|
||||
// An empty guide which the organization locked means the default guide for everybody:
|
||||
if (this.IsCustomPromptGuideLocked)
|
||||
this.ClearCustomPromptGuide();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (!string.Equals(this.currentCustomPromptGuidePath, guidePath, StringComparison.OrdinalIgnoreCase))
|
||||
this.customPromptingGuidelineContent = string.Empty;
|
||||
|
||||
this.useCustomPromptGuide = true;
|
||||
this.customPromptGuideFiles = [ FileAttachment.FromPath(guidePath) ];
|
||||
this.currentCustomPromptGuidePath = guidePath;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Goes back to the default prompt guide.
|
||||
/// </summary>
|
||||
private void ClearCustomPromptGuide()
|
||||
{
|
||||
this.useCustomPromptGuide = false;
|
||||
this.customPromptGuideFiles.Clear();
|
||||
this.currentCustomPromptGuidePath = string.Empty;
|
||||
this.customPromptingGuidelineContent = string.Empty;
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
this.ResetGuidelineSummaryToDefault();
|
||||
@@ -190,13 +244,13 @@ public partial class AssistantPromptOptimizer : AssistantBaseCore<SettingsDialog
|
||||
private string recLanguageChoice = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// The files a custom prompt guide can come from.
|
||||
/// The files a custom prompt guide can come from, in the assistant and in its settings.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Documents only: an audio or a video file would be transcribed, and a transcript reports
|
||||
/// the name of its file rather than the path, which the preview of the guide needs.
|
||||
/// </remarks>
|
||||
private static readonly FileTypeFilter[] CUSTOM_PROMPT_GUIDE_FILE_TYPES = [ FileTypes.DOCUMENT ];
|
||||
internal static readonly FileTypeFilter[] CUSTOM_PROMPT_GUIDE_FILE_TYPES = [ FileTypes.DOCUMENT ];
|
||||
|
||||
private static readonly AssistantSessionStateKey<string> INPUT_PROMPT_STATE_KEY = new(nameof(inputPrompt));
|
||||
private static readonly AssistantSessionStateKey<CommonLanguages> SELECTED_TARGET_LANGUAGE_STATE_KEY = new(nameof(selectedTargetLanguage));
|
||||
@@ -258,8 +312,21 @@ public partial class AssistantPromptOptimizer : AssistantBaseCore<SettingsDialog
|
||||
state.Restore(REC_STRUCTURE_MARKERS_STATE_KEY, value => this.recStructureMarkers = value);
|
||||
state.Restore(REC_ROLE_DEFINITION_STATE_KEY, value => this.recRoleDefinition = value);
|
||||
state.Restore(REC_LANGUAGE_CHOICE_STATE_KEY, value => this.recLanguageChoice = value);
|
||||
|
||||
// A session from before the organization locked its prompt guide must not bring back another one:
|
||||
if (this.IsCustomPromptGuideLocked)
|
||||
this.PreselectCustomPromptGuide();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether the organization decides which prompt guide this assistant uses.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The guide is a preselection, so a lock binds only while preselection is enabled, as for the
|
||||
/// template of the Slide Assistant. Without preselection, the user may choose any guide.
|
||||
/// </remarks>
|
||||
private bool IsCustomPromptGuideLocked => this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectOptions && ManagedConfiguration.TryGet(x => x.PromptOptimizer, x => x.PreselectedCustomPromptGuidePath, out var meta) && meta.IsLocked;
|
||||
|
||||
private bool ShowUpdatedPromptGuidelinesIndicator => !this.useCustomPromptGuide && this.hasUpdatedDefaultRecommendations;
|
||||
private bool CanPreviewCustomPromptGuide => this.useCustomPromptGuide && this.customPromptGuideFiles.Count > 0;
|
||||
private bool CanImproveFurther => !this.IsProcessing && !string.IsNullOrWhiteSpace(this.optimizedPrompt);
|
||||
@@ -313,7 +380,9 @@ public partial class AssistantPromptOptimizer : AssistantBaseCore<SettingsDialog
|
||||
var promptingGuideline = await this.GetPromptingGuidelineForOptimizationAsync();
|
||||
if (string.IsNullOrWhiteSpace(promptingGuideline))
|
||||
{
|
||||
if (this.useCustomPromptGuide)
|
||||
if (this.useCustomPromptGuide && this.IsCustomPromptGuideLocked)
|
||||
this.AddInputIssue(T("The prompt guide of your organization could not be loaded."));
|
||||
else if (this.useCustomPromptGuide)
|
||||
this.AddInputIssue(T("Please attach and load a valid custom prompt guide file."));
|
||||
else
|
||||
this.AddInputIssue(T("The prompting guideline file could not be loaded. Please verify 'prompting_guideline.md' in Assistants/PromptOptimizer."));
|
||||
@@ -548,6 +617,10 @@ public partial class AssistantPromptOptimizer : AssistantBaseCore<SettingsDialog
|
||||
|
||||
private async Task SetUseCustomPromptGuide(bool useCustom)
|
||||
{
|
||||
// The switch is disabled then; this keeps it so should anything else call here:
|
||||
if (this.IsCustomPromptGuideLocked)
|
||||
return;
|
||||
|
||||
this.useCustomPromptGuide = useCustom;
|
||||
if (!useCustom)
|
||||
return;
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
AdornmentColor="@(isDropTarget ? Color.Primary : this.IconColor)"
|
||||
UserAttributes="@SPELLCHECK_ATTRIBUTES"
|
||||
Immediate="@true"
|
||||
Clearable="@this.Clearable"
|
||||
OnClearButtonClick="@this.ClearFile"
|
||||
Underline="false"
|
||||
Class="flex-grow-1"
|
||||
/>
|
||||
|
||||
@@ -45,6 +45,17 @@ public partial class ConfigurationFile : ConfigurationBaseCore
|
||||
[Parameter]
|
||||
public FileTypeFilter[]? Filter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Shows a button at the end of the field which empties it.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// For settings where an empty path means something of its own, such as the default prompt guide
|
||||
/// or no template at all. MudBlazor shows the button only while the field holds a path and can be
|
||||
/// edited, so a locked setting keeps its path.
|
||||
/// </remarks>
|
||||
[Parameter]
|
||||
public bool Clearable { get; set; }
|
||||
|
||||
[Inject]
|
||||
private RustService RustService { get; init; } = null!;
|
||||
|
||||
@@ -134,6 +145,20 @@ public partial class ConfigurationFile : ConfigurationBaseCore
|
||||
await this.OptionChanged(path);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Empties the field at once.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The text field reports the empty text as well, which would apply it only after the delay meant
|
||||
/// for typing. A click needs no such delay, so the timer stops and the change applies right away.
|
||||
/// </remarks>
|
||||
private async Task ClearFile()
|
||||
{
|
||||
this.timer.Stop();
|
||||
this.internalText = string.Empty;
|
||||
await this.OptionChanged(string.Empty);
|
||||
}
|
||||
|
||||
private async Task OptionChanged(string updatedText)
|
||||
{
|
||||
this.TextUpdate(updatedText);
|
||||
|
||||
@@ -93,6 +93,7 @@ public partial class DataRestoreReportDialog : MSGComponentBase
|
||||
DataRestoreOpenPointKind.TOOL_WITHOUT_SECRET => string.Format(T("Enter the setting '{1}' of the tool '{0}' again, if you used it."), openPoint.Name, openPoint.Setting),
|
||||
DataRestoreOpenPointKind.DATA_SOURCE_NOT_FOUND => string.Format(T("The data source '{0}' names a file or folder which does not exist on this computer. Choose it anew."), openPoint.Name),
|
||||
DataRestoreOpenPointKind.BATCH_PROCESSING_PATH_NOT_FOUND => string.Format(T("The batch processing uses '{0}', which does not exist on this computer."), openPoint.Name),
|
||||
DataRestoreOpenPointKind.PROMPT_OPTIMIZER_GUIDE_NOT_FOUND => string.Format(T("The Prompt Optimizer uses the prompt guide '{0}', which does not exist on this computer."), openPoint.Name),
|
||||
DataRestoreOpenPointKind.CERTIFICATE_BUNDLE_NOT_FOUND => string.Format(T("The file with your own root certificates, '{0}', does not exist on this computer."), openPoint.Name),
|
||||
DataRestoreOpenPointKind.ERI_SERVER_DIRECTORY_NOT_FOUND => string.Format(T("The ERI server '{0}' writes into a folder which does not exist on this computer."), openPoint.Name),
|
||||
_ => openPoint.Name,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
@using AIStudio.Assistants.PromptOptimizer
|
||||
@using AIStudio.Settings
|
||||
@inherits SettingsDialogBase
|
||||
|
||||
@@ -10,15 +11,16 @@
|
||||
</TitleContent>
|
||||
<DialogContent>
|
||||
<MudPaper Class="pa-3 mb-8 border-dashed border rounded-lg">
|
||||
<ConfigurationOption OptionDescription="@T("Preselect prompt optimizer options?")" LabelOn="@T("Prompt optimizer options are preselected")" LabelOff="@T("No prompt optimizer options are preselected")" State="@(() => this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectOptions)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectOptions = updatedState)" OptionHelp="@T("When enabled, you can preselect target language, important aspects, and provider defaults for the prompt optimizer assistant.")"/>
|
||||
<ConfigurationSelect OptionDescription="@T("Preselect the target language")" Disabled="@(() => !this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectedTargetLanguage)" Data="@ConfigurationSelectDataFactory.GetCommonLanguagesOptionalData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectedTargetLanguage = selectedValue)" OptionHelp="@T("Which target language should be preselected?")"/>
|
||||
<ConfigurationOption OptionDescription="@T("Preselect prompt optimizer options?")" LabelOn="@T("Prompt optimizer options are preselected")" LabelOff="@T("No prompt optimizer options are preselected")" State="@(() => this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectOptions)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectOptions = updatedState)" OptionHelp="@T("When enabled, you can preselect target language, important aspects, and provider defaults for the prompt optimizer assistant.")" IsLocked="() => ManagedConfiguration.TryGet(x => x.PromptOptimizer, x => x.PreselectOptions, out var meta) && meta.IsLocked"/>
|
||||
<ConfigurationSelect OptionDescription="@T("Preselect the target language")" Disabled="@(() => !this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectedTargetLanguage)" Data="@ConfigurationSelectDataFactory.GetCommonLanguagesOptionalData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectedTargetLanguage = selectedValue)" OptionHelp="@T("Which target language should be preselected?")" IsLocked="() => ManagedConfiguration.TryGet(x => x.PromptOptimizer, x => x.PreselectedTargetLanguage, out var meta) && meta.IsLocked"/>
|
||||
@if (this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectedTargetLanguage is CommonLanguages.OTHER)
|
||||
{
|
||||
<ConfigurationText OptionDescription="@T("Preselect another target language")" Disabled="@(() => !this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectOptions)" Icon="@Icons.Material.Filled.Translate" Text="@(() => this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectedOtherLanguage)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectedOtherLanguage = updatedText)"/>
|
||||
<ConfigurationText OptionDescription="@T("Preselect another target language")" Disabled="@(() => !this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectOptions)" Icon="@Icons.Material.Filled.Translate" Text="@(() => this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectedOtherLanguage)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectedOtherLanguage = updatedText)" IsLocked="() => ManagedConfiguration.TryGet(x => x.PromptOptimizer, x => x.PreselectedOtherLanguage, out var meta) && meta.IsLocked"/>
|
||||
}
|
||||
<ConfigurationText OptionDescription="@T("Preselect important aspects")" Disabled="@(() => !this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectOptions)" Text="@(() => this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectedImportantAspects)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectedImportantAspects = updatedText)" NumLines="2" OptionHelp="@T("Preselect aspects the optimizer should emphasize, such as role clarity, structure, or output constraints.")" Icon="@Icons.Material.Filled.List"/>
|
||||
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.PromptOptimizer.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.PromptOptimizer.MinimumProviderConfidence = selectedValue)"/>
|
||||
<ConfigurationProviderSelection Component="Components.PROMPT_OPTIMIZER_ASSISTANT" Data="@this.AvailableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectedProvider = selectedValue)"/>
|
||||
<ConfigurationText OptionDescription="@T("Preselect important aspects")" Disabled="@(() => !this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectOptions)" Text="@(() => this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectedImportantAspects)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectedImportantAspects = updatedText)" NumLines="2" OptionHelp="@T("Preselect aspects the optimizer should emphasize, such as role clarity, structure, or output constraints.")" Icon="@Icons.Material.Filled.List" IsLocked="() => ManagedConfiguration.TryGet(x => x.PromptOptimizer, x => x.PreselectedImportantAspects, out var meta) && meta.IsLocked"/>
|
||||
<ConfigurationFile OptionDescription="@T("Preselect a custom prompt guide")" Disabled="@(() => !this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectOptions)" Icon="@Icons.Material.Filled.MenuBook" Text="@(() => this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectedCustomPromptGuidePath)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectedCustomPromptGuidePath = updatedText)" FileDialogTitle="@T("Select a prompt guide")" Filter="@AssistantPromptOptimizer.CUSTOM_PROMPT_GUIDE_FILE_TYPES" Clearable="@true" OptionHelp="@T("Leave this empty to use the default prompt guide. The assistant loads the current content of this file whenever it applies your preselections.")" IsLocked="() => ManagedConfiguration.TryGet(x => x.PromptOptimizer, x => x.PreselectedCustomPromptGuidePath, out var meta) && meta.IsLocked"/>
|
||||
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.PromptOptimizer.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.PromptOptimizer.MinimumProviderConfidence = selectedValue)" IsLocked="() => ManagedConfiguration.TryGet(x => x.PromptOptimizer, x => x.MinimumProviderConfidence, out var meta) && meta.IsLocked"/>
|
||||
<ConfigurationProviderSelection Component="Components.PROMPT_OPTIMIZER_ASSISTANT" Data="@this.AvailableLLMProviders" Disabled="@(() => !this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.PromptOptimizer.PreselectedProvider = selectedValue)" IsLocked="() => ManagedConfiguration.TryGet(x => x.PromptOptimizer, x => x.PreselectedProvider, out var meta) && meta.IsLocked"/>
|
||||
</MudPaper>
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<MudJustifiedText Typo="Typo.body2" Class="mb-3">
|
||||
@SlideAssistantTexts.WhatTheLLMKnowsOfLayouts
|
||||
</MudJustifiedText>
|
||||
<ConfigurationFile OptionDescription="@T("Preselect a PowerPoint template")" Disabled="@(() => !this.SettingsManager.ConfigurationData.SlideBuilder.PreselectOptions)" Icon="@Icons.Material.Filled.Slideshow" Text="@(() => this.SettingsManager.ConfigurationData.SlideBuilder.TemplatePath)" TextUpdate="@this.SetTemplatePath" FileDialogTitle="@T("Select a PowerPoint template")" Filter="@([FileTypes.POWER_POINT_TEMPLATE])" OptionHelp="@T("The slides use the layouts of this PowerPoint presentation or template (.pptx, .potx), and you can create a PowerPoint file (.pptx) from the result. OpenDocument presentations (.odp, .otp) cannot serve as a template yet. Leave it empty to plan an outline only.")" IsLocked="() => ManagedConfiguration.TryGet(x => x.SlideBuilder, x => x.TemplatePath, out var meta) && meta.IsLocked"/>
|
||||
<ConfigurationFile OptionDescription="@T("Preselect a PowerPoint template")" Disabled="@(() => !this.SettingsManager.ConfigurationData.SlideBuilder.PreselectOptions)" Icon="@Icons.Material.Filled.Slideshow" Text="@(() => this.SettingsManager.ConfigurationData.SlideBuilder.TemplatePath)" TextUpdate="@this.SetTemplatePath" FileDialogTitle="@T("Select a PowerPoint template")" Filter="@([FileTypes.POWER_POINT_TEMPLATE])" Clearable="@true" OptionHelp="@T("The slides use the layouts of this PowerPoint presentation or template (.pptx, .potx), and you can create a PowerPoint file (.pptx) from the result. OpenDocument presentations (.odp, .otp) cannot serve as a template yet. Leave it empty to plan an outline only.")" IsLocked="() => ManagedConfiguration.TryGet(x => x.SlideBuilder, x => x.TemplatePath, out var meta) && meta.IsLocked"/>
|
||||
<ConfigurationText OptionDescription="@T("Preselect the footer text")" Disabled="@(() => !this.SettingsManager.ConfigurationData.SlideBuilder.PreselectOptions)" Icon="@Icons.Material.Filled.ShortText" Text="@(() => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedFooterText)" TextUpdate="@(updatedText => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedFooterText = updatedText)" OptionHelp="@T("Shown on every slide whose layout has a footer, e.g., your name, organization, and date. Leave it empty for no footer.")" IsLocked="() => ManagedConfiguration.TryGet(x => x.SlideBuilder, x => x.PreselectedFooterText, out var meta) && meta.IsLocked"/>
|
||||
<ConfigurationSelect OptionDescription="@T("Preselect the maximum number of bullet points per slide")" Disabled="@(() => !this.SettingsManager.ConfigurationData.SlideBuilder.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedMaxBulletPointsPerSlide)" Data="@this.BulletPointMaximumOptions" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedMaxBulletPointsPerSlide = selectedValue)" OptionHelp="@T("A slide holds at most this many bullet points, in all of its text slots together. Match it to the room for text in the layouts of your template.")" IsLocked="() => ManagedConfiguration.TryGet(x => x.SlideBuilder, x => x.PreselectedMaxBulletPointsPerSlide, out var meta) && meta.IsLocked"/>
|
||||
<ConfigurationOption OptionDescription="@T("Preselect keeping empty picture placeholders?")" Disabled="@(() => !this.SettingsManager.ConfigurationData.SlideBuilder.PreselectOptions)" LabelOn="@T("Empty picture placeholders are kept")" LabelOff="@T("Empty picture placeholders are left out")" State="@(() => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedKeepEmptyPicturePlaceholders)" StateUpdate="@(value => this.SettingsManager.ConfigurationData.SlideBuilder.PreselectedKeepEmptyPicturePlaceholders = value)" OptionHelp="@SlideAssistantTexts.WhatKeepingEmptyPicturePlaceholdersDoes" IsLocked="() => ManagedConfiguration.TryGet(x => x.SlideBuilder, x => x.PreselectedKeepEmptyPicturePlaceholders, out var meta) && meta.IsLocked"/>
|
||||
|
||||
@@ -1013,6 +1013,62 @@ CONFIG["SETTINGS"] = {}
|
||||
-- CONFIG["SETTINGS"]["DataAssistantBuilder.PreselectedOtherOutputLanguage.AllowUserOverride"] = true
|
||||
-- CONFIG["SETTINGS"]["DataAssistantBuilder.MinimumProviderConfidence.AllowUserOverride"] = true
|
||||
|
||||
-- Configure defaults for the Prompt Optimizer.
|
||||
-- These settings need AI Studio v26.11.1 or newer; older versions ignore them.
|
||||
-- Preselection must be enabled for the remaining Prompt Optimizer settings to take effect.
|
||||
-- CONFIG["SETTINGS"]["DataPromptOptimizer.PreselectOptions"] = true
|
||||
--
|
||||
-- Configure the language of the optimized prompt.
|
||||
-- Allowed values are: AS_IS, EN_US, EN_GB, ZH_CN, HI_IN, ES_ES, FR_FR, DE_DE, DE_CH, DE_AT,
|
||||
-- JA_JP, RU_RU, OTHER
|
||||
-- AS_IS keeps the language of the prompt the user enters.
|
||||
-- CONFIG["SETTINGS"]["DataPromptOptimizer.PreselectedTargetLanguage"] = "AS_IS"
|
||||
--
|
||||
-- Configure a free-form language, used only when PreselectedTargetLanguage is "OTHER".
|
||||
-- CONFIG["SETTINGS"]["DataPromptOptimizer.PreselectedOtherLanguage"] = ""
|
||||
--
|
||||
-- Configure the aspects the optimized prompt should emphasize, such as the structure of the
|
||||
-- answer or constraints.
|
||||
-- CONFIG["SETTINGS"]["DataPromptOptimizer.PreselectedImportantAspects"] = ""
|
||||
--
|
||||
-- Configure the prompt guide of your organization. The Prompt Optimizer then optimizes prompts
|
||||
-- along this guide instead of its default one, and it reads the current content of the file
|
||||
-- whenever it opens. Lock it so that users cannot choose another guide in the assistant; lock
|
||||
-- PreselectOptions as well, because the guide applies only while preselection is enabled.
|
||||
-- An empty path stands for the default guide: locked, it makes everybody use the default guide.
|
||||
--
|
||||
-- The simplest way is to ship the guide with this plugin: put the file, e.g., a Markdown, PDF,
|
||||
-- or Word document, next to this plugin.lua, or into a folder below it, and give its path
|
||||
-- relative to this plugin.lua. The path must stay inside the plugin directory, i.e., no '..'
|
||||
-- segments and no links pointing out of it. When the file is missing or the path is rejected,
|
||||
-- AI Studio logs a warning, and this plugin does not manage the guide: users keep the one they
|
||||
-- chose, or the default guide.
|
||||
-- CONFIG["SETTINGS"]["DataPromptOptimizer.PreselectedCustomPromptGuidePath"] = "Prompting-Guide.md"
|
||||
--
|
||||
-- An absolute path works as well. It must be readable on every machine, e.g., on a network
|
||||
-- share or in a folder your software distribution fills; for Flatpak installations, it must
|
||||
-- be readable inside the sandbox.
|
||||
-- CONFIG["SETTINGS"]["DataPromptOptimizer.PreselectedCustomPromptGuidePath"] = "C:\\Guides\\Prompting-Guide.md"
|
||||
--
|
||||
-- Configure the minimum provider confidence required to optimize prompts.
|
||||
-- Allowed values are: NONE, UNTRUSTED, UNKNOWN, VERY_LOW, LOW, MODERATE, MEDIUM, HIGH
|
||||
-- Providers below this level cannot be selected in the Prompt Optimizer. This minimum applies
|
||||
-- only while preselection is enabled; the app-wide minimum confidence applies in any case.
|
||||
-- CONFIG["SETTINGS"]["DataPromptOptimizer.MinimumProviderConfidence"] = "NONE"
|
||||
--
|
||||
-- Configure the preselected provider for optimizing prompts.
|
||||
-- It must be one of the provider IDs defined in CONFIG["LLM_PROVIDERS"].
|
||||
-- CONFIG["SETTINGS"]["DataPromptOptimizer.PreselectedProvider"] = "00000000-0000-0000-0000-000000000000"
|
||||
--
|
||||
-- Allow users to change individual managed Prompt Optimizer defaults locally.
|
||||
-- CONFIG["SETTINGS"]["DataPromptOptimizer.PreselectOptions.AllowUserOverride"] = true
|
||||
-- CONFIG["SETTINGS"]["DataPromptOptimizer.PreselectedTargetLanguage.AllowUserOverride"] = true
|
||||
-- CONFIG["SETTINGS"]["DataPromptOptimizer.PreselectedOtherLanguage.AllowUserOverride"] = true
|
||||
-- CONFIG["SETTINGS"]["DataPromptOptimizer.PreselectedImportantAspects.AllowUserOverride"] = true
|
||||
-- CONFIG["SETTINGS"]["DataPromptOptimizer.PreselectedCustomPromptGuidePath.AllowUserOverride"] = true
|
||||
-- CONFIG["SETTINGS"]["DataPromptOptimizer.MinimumProviderConfidence.AllowUserOverride"] = true
|
||||
-- CONFIG["SETTINGS"]["DataPromptOptimizer.PreselectedProvider.AllowUserOverride"] = true
|
||||
|
||||
-- Configure enterprise approvals for assistant plugins.
|
||||
-- Each approval is matched only by the current SHA-256 hash over all Lua files
|
||||
-- in the assistant plugin folder, in canonical sorted order.
|
||||
|
||||
+18
@@ -2280,6 +2280,9 @@ UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::PROMPTOPTIMIZER::ASSISTANTPROMPTOPTIMIZER
|
||||
-- Optimize prompt
|
||||
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::PROMPTOPTIMIZER::ASSISTANTPROMPTOPTIMIZER::T1857716344"] = "Prompt optimieren"
|
||||
|
||||
-- The prompt guide of your organization could not be loaded.
|
||||
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::PROMPTOPTIMIZER::ASSISTANTPROMPTOPTIMIZER::T1909702735"] = "Der Prompting-Leitfaden Ihrer Organisation konnte nicht geladen werden."
|
||||
|
||||
-- Break the task into numbered steps if order matters.
|
||||
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::PROMPTOPTIMIZER::ASSISTANTPROMPTOPTIMIZER::T2185953360"] = "Zerlegen Sie die Aufgabe in nummerierte Schritte, wenn die Reihenfolge wichtig ist."
|
||||
|
||||
@@ -2295,6 +2298,9 @@ UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::PROMPTOPTIMIZER::ASSISTANTPROMPTOPTIMIZER
|
||||
-- Use an LLM to optimize your prompt by following either the default or your individual prompt guidelines and get targeted recommendations for future versions of the prompt.
|
||||
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::PROMPTOPTIMIZER::ASSISTANTPROMPTOPTIMIZER::T2466607250"] = "Verwenden Sie ein LLM, um Ihren Prompt zu optimieren, indem Sie entweder den Standard- oder Ihren individuellen Prompting-Leitfaden verwenden, und erhalten Sie gezielte Empfehlungen für zukünftige Versionen des Prompts."
|
||||
|
||||
-- Use the prompt recommendations from the prompt guide of your organization.
|
||||
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::PROMPTOPTIMIZER::ASSISTANTPROMPTOPTIMIZER::T2660819035"] = "Verwenden Sie die Prompt-Empfehlungen aus dem Prompting-Leitfaden Ihrer Organisation."
|
||||
|
||||
-- Replaced the previously selected custom prompt guide file.
|
||||
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::PROMPTOPTIMIZER::ASSISTANTPROMPTOPTIMIZER::T2698103422"] = "Der zuvor ausgewählte benutzerdefinierte Prompting-Leitfaden wurde ersetzt."
|
||||
|
||||
@@ -7215,6 +7221,9 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::DATARESTOREREPORTDIALOG::T3430781520"] = "Ge
|
||||
-- Technical details: {0}
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::DATARESTOREREPORTDIALOG::T3436390766"] = "Technische Details: {0}"
|
||||
|
||||
-- The Prompt Optimizer uses the prompt guide '{0}', which does not exist on this computer.
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::DATARESTOREREPORTDIALOG::T3445391882"] = "Der Prompt-Optimierer verwendet den Prompting-Leitfaden „{0}“, der auf diesem Rechner nicht vorhanden ist."
|
||||
|
||||
-- Close
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::DATARESTOREREPORTDIALOG::T3448155331"] = "Schließen"
|
||||
|
||||
@@ -10047,12 +10056,18 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGPROFILES::T55364659"
|
||||
-- Are you a project manager in a research facility? You might want to create a profile for your project management activities, one for your scientific work, and a profile for when you need to write program code. In these profiles, you can record how much experience you have or which methods you like or dislike using. Later, you can choose when and where you want to use each profile.
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGPROFILES::T56359901"] = "Sind Sie Projektleiter in einer Forschungseinrichtung? Dann möchten Sie vielleicht ein Profil für Ihre Projektmanagement-Aufgaben erstellen, eines für Ihre wissenschaftliche Arbeit und ein Profil für das Schreiben von Programmcode. In diesen Profilen können Sie festhalten, wie viel Erfahrung Sie haben oder welche Methoden Sie gerne oder weniger gerne nutzen. Später können Sie auswählen, wann und wo Sie jedes Profil verwenden möchten."
|
||||
|
||||
-- Preselect a custom prompt guide
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGPROMPTOPTIMIZER::T1075392178"] = "Benutzerdefinierten Prompting-Leitfaden vorauswählen"
|
||||
|
||||
-- Preselect the target language
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGPROMPTOPTIMIZER::T1417990312"] = "Zielsprache vorauswählen"
|
||||
|
||||
-- Preselect another target language
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGPROMPTOPTIMIZER::T1462295644"] = "Eine andere Zielsprache vorauswählen"
|
||||
|
||||
-- Leave this empty to use the default prompt guide. The assistant loads the current content of this file whenever it applies your preselections.
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGPROMPTOPTIMIZER::T155885829"] = "Lassen Sie dieses Feld leer, um den Standard-Prompting-Leitfaden zu verwenden. Der Assistent lädt den aktuellen Inhalt dieser Datei, wann immer er Ihre Vorauswahl übernimmt."
|
||||
|
||||
-- Assistant: Prompt Optimizer Options
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGPROMPTOPTIMIZER::T2309650422"] = "Assistent: Optionen für die Prompt-Optimierung"
|
||||
|
||||
@@ -10080,6 +10095,9 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGPROMPTOPTIMIZER::T35
|
||||
-- Preselect important aspects
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGPROMPTOPTIMIZER::T3705987833"] = "Wichtige Aspekte vorauswählen"
|
||||
|
||||
-- Select a prompt guide
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGPROMPTOPTIMIZER::T4252279140"] = "Prompting-Leitfaden auswählen"
|
||||
|
||||
-- Which writing style should be preselected?
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGREWRITE::T1173034744"] = "Welcher Schreibstil soll vorausgewählt werden?"
|
||||
|
||||
|
||||
+18
@@ -2280,6 +2280,9 @@ UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::PROMPTOPTIMIZER::ASSISTANTPROMPTOPTIMIZER
|
||||
-- Optimize prompt
|
||||
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::PROMPTOPTIMIZER::ASSISTANTPROMPTOPTIMIZER::T1857716344"] = "Optimize prompt"
|
||||
|
||||
-- The prompt guide of your organization could not be loaded.
|
||||
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::PROMPTOPTIMIZER::ASSISTANTPROMPTOPTIMIZER::T1909702735"] = "The prompt guide of your organization could not be loaded."
|
||||
|
||||
-- Break the task into numbered steps if order matters.
|
||||
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::PROMPTOPTIMIZER::ASSISTANTPROMPTOPTIMIZER::T2185953360"] = "Break the task into numbered steps if order matters."
|
||||
|
||||
@@ -2295,6 +2298,9 @@ UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::PROMPTOPTIMIZER::ASSISTANTPROMPTOPTIMIZER
|
||||
-- Use an LLM to optimize your prompt by following either the default or your individual prompt guidelines and get targeted recommendations for future versions of the prompt.
|
||||
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::PROMPTOPTIMIZER::ASSISTANTPROMPTOPTIMIZER::T2466607250"] = "Use an LLM to optimize your prompt by following either the default or your individual prompt guidelines and get targeted recommendations for future versions of the prompt."
|
||||
|
||||
-- Use the prompt recommendations from the prompt guide of your organization.
|
||||
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::PROMPTOPTIMIZER::ASSISTANTPROMPTOPTIMIZER::T2660819035"] = "Use the prompt recommendations from the prompt guide of your organization."
|
||||
|
||||
-- Replaced the previously selected custom prompt guide file.
|
||||
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::PROMPTOPTIMIZER::ASSISTANTPROMPTOPTIMIZER::T2698103422"] = "Replaced the previously selected custom prompt guide file."
|
||||
|
||||
@@ -7215,6 +7221,9 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::DATARESTOREREPORTDIALOG::T3430781520"] = "En
|
||||
-- Technical details: {0}
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::DATARESTOREREPORTDIALOG::T3436390766"] = "Technical details: {0}"
|
||||
|
||||
-- The Prompt Optimizer uses the prompt guide '{0}', which does not exist on this computer.
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::DATARESTOREREPORTDIALOG::T3445391882"] = "The Prompt Optimizer uses the prompt guide '{0}', which does not exist on this computer."
|
||||
|
||||
-- Close
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::DATARESTOREREPORTDIALOG::T3448155331"] = "Close"
|
||||
|
||||
@@ -10047,12 +10056,18 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGPROFILES::T55364659"
|
||||
-- Are you a project manager in a research facility? You might want to create a profile for your project management activities, one for your scientific work, and a profile for when you need to write program code. In these profiles, you can record how much experience you have or which methods you like or dislike using. Later, you can choose when and where you want to use each profile.
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGPROFILES::T56359901"] = "Are you a project manager in a research facility? You might want to create a profile for your project management activities, one for your scientific work, and a profile for when you need to write program code. In these profiles, you can record how much experience you have or which methods you like or dislike using. Later, you can choose when and where you want to use each profile."
|
||||
|
||||
-- Preselect a custom prompt guide
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGPROMPTOPTIMIZER::T1075392178"] = "Preselect a custom prompt guide"
|
||||
|
||||
-- Preselect the target language
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGPROMPTOPTIMIZER::T1417990312"] = "Preselect the target language"
|
||||
|
||||
-- Preselect another target language
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGPROMPTOPTIMIZER::T1462295644"] = "Preselect another target language"
|
||||
|
||||
-- Leave this empty to use the default prompt guide. The assistant loads the current content of this file whenever it applies your preselections.
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGPROMPTOPTIMIZER::T155885829"] = "Leave this empty to use the default prompt guide. The assistant loads the current content of this file whenever it applies your preselections."
|
||||
|
||||
-- Assistant: Prompt Optimizer Options
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGPROMPTOPTIMIZER::T2309650422"] = "Assistant: Prompt Optimizer Options"
|
||||
|
||||
@@ -10080,6 +10095,9 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGPROMPTOPTIMIZER::T35
|
||||
-- Preselect important aspects
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGPROMPTOPTIMIZER::T3705987833"] = "Preselect important aspects"
|
||||
|
||||
-- Select a prompt guide
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGPROMPTOPTIMIZER::T4252279140"] = "Select a prompt guide"
|
||||
|
||||
-- Which writing style should be preselected?
|
||||
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGREWRITE::T1173034744"] = "Which writing style should be preselected?"
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
@@ -47,6 +47,11 @@ public enum DataRestoreOpenPointKind
|
||||
/// </summary>
|
||||
BATCH_PROCESSING_PATH_NOT_FOUND,
|
||||
|
||||
/// <summary>
|
||||
/// The prompt guide which the Prompt Optimizer preselects does not exist on this computer.
|
||||
/// </summary>
|
||||
PROMPT_OPTIMIZER_GUIDE_NOT_FOUND,
|
||||
|
||||
/// <summary>
|
||||
/// The file with custom root certificates does not exist on this computer.
|
||||
/// </summary>
|
||||
|
||||
@@ -75,6 +75,10 @@ public static class DataRestoreOpenPoints
|
||||
if (!string.IsNullOrWhiteSpace(batchProcessing.PromptFilePath) && !File.Exists(batchProcessing.PromptFilePath))
|
||||
openPoints.Add(new(DataRestoreOpenPointKind.BATCH_PROCESSING_PATH_NOT_FOUND, batchProcessing.PromptFilePath));
|
||||
|
||||
var promptGuidePath = settings.PromptOptimizer.PreselectedCustomPromptGuidePath;
|
||||
if (!string.IsNullOrWhiteSpace(promptGuidePath) && !File.Exists(promptGuidePath))
|
||||
openPoints.Add(new(DataRestoreOpenPointKind.PROMPT_OPTIMIZER_GUIDE_NOT_FOUND, promptGuidePath));
|
||||
|
||||
var certificateBundlePath = settings.App.ExternalHttpCustomRootCertificateBundlePath;
|
||||
if (settings.App.ExternalHttpCustomRootCertificatesEnabled && !string.IsNullOrWhiteSpace(certificateBundlePath) && !File.Exists(certificateBundlePath))
|
||||
openPoints.Add(new(DataRestoreOpenPointKind.CERTIFICATE_BUNDLE_NOT_FOUND, certificateBundlePath));
|
||||
|
||||
@@ -523,6 +523,15 @@ public sealed class PluginConfiguration(bool isInternal, LuaState state, PluginT
|
||||
ManagedConfiguration.TryProcessConfiguration(x => x.AssistantBuilder, x => x.PreselectedOtherOutputLanguage, this.Id, settingsTable, dryRun);
|
||||
ManagedConfiguration.TryProcessConfiguration(x => x.AssistantBuilder, x => x.MinimumProviderConfidence, this.Id, settingsTable, dryRun);
|
||||
|
||||
// Config: Prompt Optimizer defaults?
|
||||
ManagedConfiguration.TryProcessConfiguration(x => x.PromptOptimizer, x => x.PreselectOptions, this.Id, settingsTable, dryRun);
|
||||
ManagedConfiguration.TryProcessConfiguration(x => x.PromptOptimizer, x => x.PreselectedTargetLanguage, this.Id, settingsTable, dryRun);
|
||||
ManagedConfiguration.TryProcessConfiguration(x => x.PromptOptimizer, x => x.PreselectedOtherLanguage, this.Id, settingsTable, dryRun);
|
||||
ManagedConfiguration.TryProcessConfiguration(x => x.PromptOptimizer, x => x.PreselectedImportantAspects, this.Id, settingsTable, dryRun);
|
||||
ManagedConfiguration.TryProcessConfiguration(x => x.PromptOptimizer, x => x.PreselectedCustomPromptGuidePath, this.Id, settingsTable, dryRun, convert: this.ResolvePluginFile);
|
||||
ManagedConfiguration.TryProcessConfiguration(x => x.PromptOptimizer, x => x.MinimumProviderConfidence, this.Id, settingsTable, dryRun);
|
||||
ManagedConfiguration.TryProcessConfiguration(x => x.PromptOptimizer, x => x.PreselectedProvider, Guid.Empty, this.Id, settingsTable, dryRun);
|
||||
|
||||
// Config: transcription provider?
|
||||
ManagedConfiguration.TryProcessConfiguration(x => x.App, x => x.UseTranscriptionProvider, Guid.Empty, this.Id, settingsTable, dryRun);
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
- Added buttons to copy and save the formulas in the chat. When you point at a formula, you can copy its LaTeX code or save it as a LaTeX file, and the export menu of an answer offers its formulas as well.
|
||||
- Added support for OneNote sections (`.one`): you can attach them to chats and assistants and use them in your local data sources. AI Studio reads every page, including the text OneNote recognized in pictures and handwriting.
|
||||
- Added the Mathematics tools as a prototype: the AI can now calculate exactly and work with formulas, right on your computer. It keeps fractions exact, gives results with up to 100 digits, solves equations, differentiates and integrates, and can check whether an integral really has the value someone claims. AI Studio checks the results numerically wherever possible, and the AI tells you when a result is only approximate. To try it, open the app settings, allow preview features down to prototype, enable Mathematics, and then choose Mathematics among the tools of a chat.
|
||||
- Added a way for IT departments to preselect the options of the Prompt Optimizer, such as the prompt guide of your organization, the language of the optimized prompt, and the provider. They can lock each option or let you change it.
|
||||
- Added your own prompt guide to the options of the Prompt Optimizer. Choose the file once, and the assistant uses it whenever you open it or start over, always with the current content of the file.
|
||||
- Improved the documentation for IT departments, which now lives in our [wiki](https://github.com/MindWorkAI/AI-Studio/wiki/Enterprise-IT). It is sorted by task, explains the setup on Windows, Linux, and macOS, and offers complete configurations for typical needs, such as using only local models. The link in the app settings leads there, and the wiki also holds the installation guide in English and German.
|
||||
- Improved the German translation throughout: we proofread all texts and corrected wrong labels as well as spelling and grammar mistakes. The texts now always address you formally and use the same terms everywhere.
|
||||
- Improved the security of the connection between the app window and AI Studio.
|
||||
@@ -14,6 +16,7 @@
|
||||
- Improved how carefully AI Studio reads the answers of AI models and external data sources: an answer that contains the same entry twice, possibly with two different values, is now refused instead of AI Studio picking one of them. This covers tool calls, the Assistant Builder, the Visual Briefing assistant, and ERI servers.
|
||||
- Improved the order of the models when you add or edit a provider: AI Studio now sorts the numbers in model names by their value, so that, for example, a model with version 4.10 comes before one with version 4.9, and the newest models stay at the top of the list.
|
||||
- Improved the information page, which now shows the Rust compiler that actually built your copy of AI Studio. Before, it always showed the compiler of our official builds, even for builds such as the Flatpak, which bring their own one.
|
||||
- Improved the options of the Slide Assistant: a button in the field of the PowerPoint template removes your template again, so the assistant plans an outline only.
|
||||
- Changed the size of AI Studio on laptop screens: it now appears in the same size on every laptop, whatever the scaling of your operating system. If you prefer the previous size, choose "System scaling" for the interface size in the app settings. Contributed by Paul Koudelka.
|
||||
- Fixed AI Studio becoming unusable when an update failed after its download. The app now restarts with the version you have installed, so you can simply try the update again.
|
||||
- Fixed configuration plugins you installed yourself being able to change the tool settings of your organization, such as the minimum provider confidence of a tool. These settings now follow the same rules as all other settings, which also gives you back your own values once your organization removes its configuration.
|
||||
|
||||
@@ -76,6 +76,7 @@ public sealed class DataRestoreOpenPointsTests
|
||||
settings.BatchProcessing.InputDirectory = missingFolder;
|
||||
settings.BatchProcessing.OutputDirectory = this.testDirectory;
|
||||
settings.BatchProcessing.PromptFilePath = missingFile;
|
||||
settings.PromptOptimizer.PreselectedCustomPromptGuidePath = missingFile;
|
||||
settings.App.ExternalHttpCustomRootCertificatesEnabled = true;
|
||||
settings.App.ExternalHttpCustomRootCertificateBundlePath = missingFile;
|
||||
settings.ERI.ERIServers.Add(new DataERIServer { ServerName = "Wiki server", WriteToFilesystem = true, BaseDirectory = missingFolder });
|
||||
@@ -89,6 +90,7 @@ public sealed class DataRestoreOpenPointsTests
|
||||
new(DataRestoreOpenPointKind.DATA_SOURCE_NOT_FOUND, "Handbook"),
|
||||
new(DataRestoreOpenPointKind.BATCH_PROCESSING_PATH_NOT_FOUND, missingFolder),
|
||||
new(DataRestoreOpenPointKind.BATCH_PROCESSING_PATH_NOT_FOUND, missingFile),
|
||||
new(DataRestoreOpenPointKind.PROMPT_OPTIMIZER_GUIDE_NOT_FOUND, missingFile),
|
||||
new(DataRestoreOpenPointKind.CERTIFICATE_BUNDLE_NOT_FOUND, missingFile),
|
||||
new(DataRestoreOpenPointKind.ERI_SERVER_DIRECTORY_NOT_FOUND, "Wiki server"),
|
||||
}));
|
||||
|
||||
@@ -56,6 +56,7 @@ public sealed class ManagedSettingsCoverageTests
|
||||
{
|
||||
["DataSlideBuilder.TemplatePath"] = Path.Combine(Path.GetTempPath(), "Corporate.potx").Replace('\\', '/'),
|
||||
["DataSlideBuilder.PreselectedPictureLibraryPath"] = Path.Combine(Path.GetTempPath(), "Pictures").Replace('\\', '/'),
|
||||
["DataPromptOptimizer.PreselectedCustomPromptGuidePath"] = Path.Combine(Path.GetTempPath(), "Prompting-Guide.md").Replace('\\', '/'),
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in new issue
Block a user