mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-04 23:07:23 +00:00
Generated the JSON contracts of the stored data at compile time (#1148)
This commit is contained in:
1 parent
fc7399e81b
commit
e954881fda
75 files changed
+5437
-298
No files matched your search
@@ -27,6 +27,27 @@ public sealed record TranscriptionProvider(
|
||||
HFInferenceProvider HFInferenceProvider = HFInferenceProvider.NONE,
|
||||
bool PromptForUserAPIKey = false) : ConfigurationBaseObject, ISecretId, IUserProvidedAPIKey
|
||||
{
|
||||
//
|
||||
// The properties of the parameters, declared again to be settable. The source generation of System.Text.Json
|
||||
// sets every init-only property while it creates the object, also one missing in the JSON, so its value from
|
||||
// the parameterless constructor would get lost. Keep them first and in the order of the parameters, which is
|
||||
// the order they get stored in:
|
||||
//
|
||||
public override uint Num { get; set; } = Num;
|
||||
public override string Id { get; set; } = Id;
|
||||
public override string Name { get; set; } = Name;
|
||||
public LLMProviders UsedLLMProvider { get; set; } = UsedLLMProvider;
|
||||
public Model Model { get; set; } = Model;
|
||||
public bool IsSelfHosted { get; set; } = IsSelfHosted;
|
||||
public override bool IsEnterpriseConfiguration { get; set; } = IsEnterpriseConfiguration;
|
||||
public override Guid EnterpriseConfigurationPluginId { get; set; } = EnterpriseConfigurationPluginId;
|
||||
public string Hostname { get; set; } = Hostname;
|
||||
public Host Host { get; set; } = Host;
|
||||
public bool AllowUserProvidedAPIKey { get; set; } = AllowUserProvidedAPIKey;
|
||||
public string CustomIconDataUrl { get; set; } = CustomIconDataUrl;
|
||||
public HFInferenceProvider HFInferenceProvider { get; set; } = HFInferenceProvider;
|
||||
public bool PromptForUserAPIKey { get; set; } = PromptForUserAPIKey;
|
||||
|
||||
private static readonly ILogger<TranscriptionProvider> LOGGER = Program.LOGGER_FACTORY.CreateLogger<TranscriptionProvider>();
|
||||
|
||||
public static readonly TranscriptionProvider NONE = new();
|
||||
|
||||
Reference in new issue
Block a user