@using AIStudio.Provider @using AIStudio.Provider.HuggingFace @using AIStudio.Provider.SelfHosted @inherits MSGComponentBase @if (this.IsEnterpriseConfiguration) { @T("This embedding provider is managed by your organization. Host, model, and other settings are locked. You can set your own API key below.") } @* ReSharper disable once CSharpWarnings::CS8974 *@ @foreach (LLMProviders provider in Enum.GetValues(typeof(LLMProviders))) { if (provider.ProvideEmbeddingAPI() || provider is LLMProviders.NONE) { } } @T("Create account") @if (this.DataLLMProvider.IsAPIKeyNeeded(this.DataHost)) { } @if (this.DataLLMProvider.IsHostnameNeeded()) { } @if (this.DataLLMProvider.IsHostNeeded()) { @foreach (Host host in Enum.GetValues(typeof(Host))) { if (host.IsEmbeddingSupported()) { @host.Name() } } } @if (this.DataLLMProvider.IsHFInstanceProviderNeeded()) { @foreach (HFInferenceProvider inferenceProvider in Enum.GetValues(typeof(HFInferenceProvider))) { @if (inferenceProvider.SupportsEmbeddings()) { @inferenceProvider.ToName() } } @T("Hugging Face offers embeddings through a few of its inference providers only, which is why this list is shorter than the one for chatting.") } @T("Load") @if (this.availableModels.Count is 0) { @T("No models loaded or available.") } else { @foreach (var model in this.availableModels) { @model } } @if (this.dataConfiguredModelIsNotOffered) { @T("This server does not offer the selected model right now. It stays selected, so the documents you already prepared keep working. Choosing another model means every document of the data sources behind this provider is prepared again.") } @if (!string.IsNullOrWhiteSpace(this.dataLoadingModelsIssue)) { @this.dataLoadingModelsIssue } @* ReSharper disable once CSharpWarnings::CS8974 *@ @if (this.DataLLMProvider != LLMProviders.NONE) { @(this.showExpertSettings ? T("Hide Expert Settings") : T("Show Expert Settings")) @T("Please be aware: This section is for experts only. For cloud providers, the selected tokenizer and chunk settings may not match the real embedding model limits exactly.") @T("Choose File") @T("You can also drag & drop the tokenizer file here.") } @if (this.dataStoreWasAttempted) { } @T("Cancel") @if (this.IsEditing) { @T("Update") } else { @T("Add") }