mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-10 22:13:47 +00:00
Reworked the Hugging Face provider (#944)
This commit is contained in:
1 parent
a7228c7782
commit
f14c69b938
28 files changed
+1039
-93
No files matched your search
@@ -1,4 +1,5 @@
|
||||
@using AIStudio.Provider
|
||||
@using AIStudio.Provider.HuggingFace
|
||||
@using AIStudio.Provider.SelfHosted
|
||||
@inherits MSGComponentBase
|
||||
|
||||
@@ -64,6 +65,24 @@
|
||||
</MudSelect>
|
||||
}
|
||||
|
||||
@if (this.DataLLMProvider.IsHFInstanceProviderNeeded())
|
||||
{
|
||||
<MudSelect T="HFInferenceProvider" Value="@this.HFInferenceProviderId" ValueChanged="@this.OnHFInferenceProviderChanged" Label="@T("Hugging Face Inference Provider")" Class="mb-3" OpenIcon="@Icons.Material.Filled.Dns" AdornmentColor="Color.Info" Adornment="Adornment.Start" Disabled="@this.IsEnterpriseConfiguration" Validation="@this.providerValidation.ValidatingHFInstanceProviderForEmbeddings">
|
||||
@foreach (HFInferenceProvider inferenceProvider in Enum.GetValues(typeof(HFInferenceProvider)))
|
||||
{
|
||||
@if (inferenceProvider.SupportsEmbeddings())
|
||||
{
|
||||
<MudSelectItem Value="@inferenceProvider">
|
||||
@inferenceProvider.ToName()
|
||||
</MudSelectItem>
|
||||
}
|
||||
}
|
||||
</MudSelect>
|
||||
<MudJustifiedText Class="mb-3">
|
||||
@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.")
|
||||
</MudJustifiedText>
|
||||
}
|
||||
|
||||
<MudField FullWidth="true" Label="@T("Model selection")" Variant="Variant.Outlined" Class="mb-3">
|
||||
<MudStack Row="@true" AlignItems="AlignItems.Center" StretchItems="StretchItems.End">
|
||||
@if (this.DataLLMProvider.IsEmbeddingModelProvidedManually(this.DataHost))
|
||||
|
||||
Reference in new issue
Block a user