mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-17 09:18:00 +00:00
Added synonym assistant (#124)
This commit is contained in:
1 parent
4ea767cb45
commit
4bd22108de
13 files changed
+237
-6
No files matched your search
@@ -86,6 +86,15 @@ public static class ConfigurationSelectDataFactory
|
||||
yield return new(language.Name(), language);
|
||||
}
|
||||
|
||||
public static IEnumerable<ConfigurationSelectData<CommonLanguages>> GetCommonLanguagesOptionalData()
|
||||
{
|
||||
foreach (var language in Enum.GetValues<CommonLanguages>())
|
||||
if(language is CommonLanguages.AS_IS)
|
||||
yield return new("Do not specify the language", language);
|
||||
else
|
||||
yield return new(language.Name(), language);
|
||||
}
|
||||
|
||||
public static IEnumerable<ConfigurationSelectData<CommonCodingLanguages>> GetCommonCodingLanguagesData()
|
||||
{
|
||||
foreach (var language in Enum.GetValues<CommonCodingLanguages>())
|
||||
|
||||
@@ -46,4 +46,6 @@ public sealed class Data
|
||||
public DataEMail EMail { get; set; } = new();
|
||||
|
||||
public DataLegalCheck LegalCheck { get; set; } = new();
|
||||
|
||||
public DataSynonyms Synonyms { get; set; } = new();
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
namespace AIStudio.Settings.DataModel;
|
||||
|
||||
public sealed class DataSynonyms
|
||||
{
|
||||
/// <summary>
|
||||
/// Preselect any rewrite options?
|
||||
/// </summary>
|
||||
public bool PreselectOptions { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Preselect the language?
|
||||
/// </summary>
|
||||
public CommonLanguages PreselectedLanguage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Preselect any other language?
|
||||
/// </summary>
|
||||
public string PreselectedOtherLanguage { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Preselect a provider?
|
||||
/// </summary>
|
||||
public string PreselectedProvider { get; set; } = string.Empty;
|
||||
}
|
||||
@@ -128,6 +128,7 @@ public sealed class SettingsManager(ILogger<SettingsManager> logger)
|
||||
Tools.Components.TEXT_SUMMARIZER_ASSISTANT => this.ConfigurationData.TextSummarizer.PreselectOptions ? this.ConfigurationData.Providers.FirstOrDefault(x => x.Id == this.ConfigurationData.TextSummarizer.PreselectedProvider) : default,
|
||||
Tools.Components.EMAIL_ASSISTANT => this.ConfigurationData.EMail.PreselectOptions ? this.ConfigurationData.Providers.FirstOrDefault(x => x.Id == this.ConfigurationData.EMail.PreselectedProvider) : default,
|
||||
Tools.Components.LEGAL_CHECK_ASSISTANT => this.ConfigurationData.LegalCheck.PreselectOptions ? this.ConfigurationData.Providers.FirstOrDefault(x => x.Id == this.ConfigurationData.LegalCheck.PreselectedProvider) : default,
|
||||
Tools.Components.SYNONYMS_ASSISTANT => this.ConfigurationData.Synonyms.PreselectOptions ? this.ConfigurationData.Providers.FirstOrDefault(x => x.Id == this.ConfigurationData.Synonyms.PreselectedProvider) : default,
|
||||
|
||||
_ => default,
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user