mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-05 00:07:21 +00:00
Turned getter-like extension methods into extension properties (#1157)
This commit is contained in:
1 parent
0375318b1b
commit
f649febf88
286 files changed
+1379
-1109
No files matched your search
@@ -207,7 +207,7 @@ public partial class ProviderDialog : MSGComponentBase, ISecretId
|
||||
GetPreviousInstanceName = () => this.dataEditingPreviousInstanceName,
|
||||
GetUsedInstanceNames = () => this.UsedInstanceNames,
|
||||
GetHost = () => this.DataHost,
|
||||
IsModelProvidedManually = () => this.DataLLMProvider.IsLLMModelProvidedManually(),
|
||||
IsModelProvidedManually = () => this.DataLLMProvider.IsLLMModelProvidedManually,
|
||||
GetCustomTokenizerValidationIssue = () => this.dataCustomTokenizerValidationIssue,
|
||||
IsModelSelectionHidden = () => this.IsLLMModelSelectionHidden,
|
||||
};
|
||||
@@ -241,7 +241,7 @@ public partial class ProviderDialog : MSGComponentBase, ISecretId
|
||||
if (this.IsLLMModelSelectionHidden)
|
||||
return Model.SYSTEM_MODEL;
|
||||
|
||||
if (this.DataLLMProvider.IsLLMModelProvidedManually())
|
||||
if (this.DataLLMProvider.IsLLMModelProvidedManually)
|
||||
return new Model(this.dataManuallyModel, null);
|
||||
|
||||
return this.DataModel;
|
||||
@@ -273,7 +273,7 @@ public partial class ProviderDialog : MSGComponentBase, ISecretId
|
||||
this.dataFilePath = this.DataTokenizerPath;
|
||||
|
||||
// When using Fireworks, we must copy the model name:
|
||||
if (this.DataLLMProvider.IsLLMModelProvidedManually())
|
||||
if (this.DataLLMProvider.IsLLMModelProvidedManually)
|
||||
this.dataManuallyModel = this.DataModel.Id;
|
||||
|
||||
// When editing, we need to load the data:
|
||||
@@ -334,7 +334,7 @@ public partial class ProviderDialog : MSGComponentBase, ISecretId
|
||||
// provider, the key has to be stored under the same "ENT::"-prefixed keyring row that the
|
||||
// app reads from at runtime (see BaseProvider.SecretId). Otherwise, a key entered here would
|
||||
// silently end up in the wrong keyring row and never be found again.
|
||||
public string SecretId => this.IsEnterpriseConfiguration ? $"{ISecretId.ENTERPRISE_KEY_PREFIX}::{this.DataLLMProvider.ToSecretId()}" : this.DataLLMProvider.ToSecretId();
|
||||
public string SecretId => this.IsEnterpriseConfiguration ? $"{ISecretId.ENTERPRISE_KEY_PREFIX}::{this.DataLLMProvider.SecretId}" : this.DataLLMProvider.SecretId;
|
||||
|
||||
public string SecretName => this.DataInstanceName;
|
||||
|
||||
@@ -421,7 +421,7 @@ public partial class ProviderDialog : MSGComponentBase, ISecretId
|
||||
|
||||
private string? ValidateManuallyModel(string manuallyModel)
|
||||
{
|
||||
if (this.DataLLMProvider.IsLLMModelProvidedManually() && string.IsNullOrWhiteSpace(manuallyModel))
|
||||
if (this.DataLLMProvider.IsLLMModelProvidedManually && string.IsNullOrWhiteSpace(manuallyModel))
|
||||
return T("Please enter a model name.");
|
||||
|
||||
return null;
|
||||
|
||||
Reference in new issue
Block a user