mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-12 23:13:48 +00:00
Move the custom tokenizer into the expert settings behind the RAG preview
This commit is contained in:
2 files changed
+36
-28
No files matched your search
@@ -6,6 +6,7 @@ using AIStudio.Provider;
|
||||
using AIStudio.Provider.HuggingFace;
|
||||
using AIStudio.Tools.Rust;
|
||||
using AIStudio.Settings;
|
||||
using AIStudio.Settings.DataModel;
|
||||
using AIStudio.Tools.Services;
|
||||
using AIStudio.Tools.Validation;
|
||||
|
||||
@@ -233,7 +234,9 @@ public partial class ProviderDialog : MSGComponentBase, ISecretId
|
||||
this.UsedInstanceNames = this.SettingsManager.GetAllProviders().Select(x => x.InstanceName.ToLowerInvariant()).ToList();
|
||||
|
||||
this.capabilityOverrides = this.DataCapabilityOverrides ?? new();
|
||||
this.showExpertSettings = !string.IsNullOrWhiteSpace(this.AdditionalJsonApiParameters) || this.capabilityOverrides.HasOverrides;
|
||||
this.showExpertSettings = !string.IsNullOrWhiteSpace(this.AdditionalJsonApiParameters)
|
||||
|| this.capabilityOverrides.HasOverrides
|
||||
|| (this.ShowTokenizerSettings && !string.IsNullOrWhiteSpace(this.DataTokenizerPath));
|
||||
|
||||
// When editing, we need to load the data:
|
||||
if(this.IsEditing)
|
||||
@@ -583,6 +586,12 @@ public partial class ProviderDialog : MSGComponentBase, ISecretId
|
||||
/// </summary>
|
||||
private string ModelsOverviewURL => this.DataLLMProvider.GetModelsOverviewURL(this.HFInferenceProviderId);
|
||||
|
||||
/// <summary>
|
||||
/// Whether the custom tokenizer is offered at all. It is an expert setting which only makes
|
||||
/// sense while the RAG preview is enabled.
|
||||
/// </summary>
|
||||
private bool ShowTokenizerSettings => this.DataLLMProvider != LLMProviders.NONE && PreviewFeatures.PRE_RAG_2024.IsEnabled(this.SettingsManager);
|
||||
|
||||
private void UpdateModelSelectionAfterLoading()
|
||||
{
|
||||
if (this.DataLLMProvider is not LLMProviders.SELF_HOSTED || this.DataHost is not Host.LLAMA_CPP)
|
||||
|
||||
Reference in new issue
Block a user