mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-17 15:18:00 +00:00
Name the preselected data sources that cannot be used right now
This commit is contained in:
3 files changed
+26
-3
No files matched your search
@@ -3901,6 +3901,9 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCESELECTION::T168406579"] = "AI-S
|
|||||||
-- AI-based data validation
|
-- AI-based data validation
|
||||||
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCESELECTION::T1744745490"] = "AI-based data validation"
|
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCESELECTION::T1744745490"] = "AI-based data validation"
|
||||||
|
|
||||||
|
-- These data sources are preselected, but cannot be used right now, either due to data privacy or confidence-level requirements, or because they are unavailable:
|
||||||
|
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCESELECTION::T1852534051"] = "These data sources are preselected, but cannot be used right now, either due to data privacy or confidence-level requirements, or because they are unavailable:"
|
||||||
|
|
||||||
-- Yes, I want to use data sources.
|
-- Yes, I want to use data sources.
|
||||||
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCESELECTION::T1975014927"] = "Yes, I want to use data sources."
|
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::DATASOURCESELECTION::T1975014927"] = "Yes, I want to use data sources."
|
||||||
|
|
||||||
@@ -11587,9 +11590,6 @@ UI_TEXT_CONTENT["AISTUDIO::TOOLS::RAG::DATASOURCESELECTIONPROCESSES::AGENTICSRCS
|
|||||||
-- Automatically selects the appropriate data sources based on the last prompt. Applies a heuristic reduction at the end to reduce the number of data sources.
|
-- Automatically selects the appropriate data sources based on the last prompt. Applies a heuristic reduction at the end to reduce the number of data sources.
|
||||||
UI_TEXT_CONTENT["AISTUDIO::TOOLS::RAG::DATASOURCESELECTIONPROCESSES::AGENTICSRCSELWITHDYNHEUR::T648937779"] = "Automatically selects the appropriate data sources based on the last prompt. Applies a heuristic reduction at the end to reduce the number of data sources."
|
UI_TEXT_CONTENT["AISTUDIO::TOOLS::RAG::DATASOURCESELECTIONPROCESSES::AGENTICSRCSELWITHDYNHEUR::T648937779"] = "Automatically selects the appropriate data sources based on the last prompt. Applies a heuristic reduction at the end to reduce the number of data sources."
|
||||||
|
|
||||||
-- None of your selected data sources could be used. This answer was created without them.
|
|
||||||
UI_TEXT_CONTENT["AISTUDIO::TOOLS::RAG::RAGPROCESSES::AISRCSELWITHRETCTXVAL::T2995829558"] = "None of your selected data sources could be used. This answer was created without them."
|
|
||||||
|
|
||||||
-- This RAG process filters data sources, automatically selects appropriate sources, optionally allows manual source selection, retrieves data, and automatically validates the retrieval context.
|
-- This RAG process filters data sources, automatically selects appropriate sources, optionally allows manual source selection, retrieves data, and automatically validates the retrieval context.
|
||||||
UI_TEXT_CONTENT["AISTUDIO::TOOLS::RAG::RAGPROCESSES::AISRCSELWITHRETCTXVAL::T3047786484"] = "This RAG process filters data sources, automatically selects appropriate sources, optionally allows manual source selection, retrieves data, and automatically validates the retrieval context."
|
UI_TEXT_CONTENT["AISTUDIO::TOOLS::RAG::RAGPROCESSES::AISRCSELWITHRETCTXVAL::T3047786484"] = "This RAG process filters data sources, automatically selects appropriate sources, optionally allows manual source selection, retrieves data, and automatically validates the retrieval context."
|
||||||
|
|
||||||
|
|||||||
@@ -67,6 +67,13 @@
|
|||||||
<MudTextSwitch Label="@T("AI-based data validation")" Value="@this.aiBasedValidation" LabelOn="@T("Yes, let the AI validate & filter the retrieved data.")" LabelOff="@T("No, use all data retrieved from the data sources.")" ValueChanged="@this.ValidationModeChanged"/>
|
<MudTextSwitch Label="@T("AI-based data validation")" Value="@this.aiBasedValidation" LabelOn="@T("Yes, let the AI validate & filter the retrieved data.")" LabelOff="@T("No, use all data retrieved from the data sources.")" ValueChanged="@this.ValidationModeChanged"/>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@if (!this.aiBasedSourceSelection && this.GetUnavailablePreselectedDataSourceNames().Length > 0)
|
||||||
|
{
|
||||||
|
<MudText Typo="Typo.body2" Color="Color.Warning" Class="mb-3">
|
||||||
|
@T("These data sources are preselected, but cannot be used right now, either due to data privacy or confidence-level requirements, or because they are unavailable:") @this.GetUnavailablePreselectedDataSourceNames()
|
||||||
|
</MudText>
|
||||||
|
}
|
||||||
|
|
||||||
@switch (this.aiBasedSourceSelection)
|
@switch (this.aiBasedSourceSelection)
|
||||||
{
|
{
|
||||||
case true when this.availableDataSources.Count == 0:
|
case true when this.availableDataSources.Count == 0:
|
||||||
|
|||||||
@@ -182,6 +182,22 @@ public partial class DataSourceSelection : MSGComponentBase
|
|||||||
return this.GetConfiguredDataSourcesSnapshot().Where(ds => preselectedDataSourceIds.Contains(ds.Id)).ToList();
|
return this.GetConfiguredDataSourcesSnapshot().Where(ds => preselectedDataSourceIds.Contains(ds.Id)).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Names the preselected data sources which the filters removed.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// This list shows what survived the filters, while the preselection keeps what the user asked
|
||||||
|
/// for. Without this, a preselected source which cannot be used right now is simply missing
|
||||||
|
/// from the list, and nothing says so. Preselected ids without a configured source are left
|
||||||
|
/// out: that source is gone, not unavailable.
|
||||||
|
/// </remarks>
|
||||||
|
/// <returns>The names of the unusable preselected data sources, or an empty string when there are none.</returns>
|
||||||
|
private string GetUnavailablePreselectedDataSourceNames()
|
||||||
|
{
|
||||||
|
var availableDataSourceIds = this.availableDataSources.Select(ds => ds.Id).ToHashSet(StringComparer.Ordinal);
|
||||||
|
return string.Join(", ", this.GetDataSourcesFromConfiguredIds().Where(ds => !availableDataSourceIds.Contains(ds.Id)).Select(ds => ds.Name));
|
||||||
|
}
|
||||||
|
|
||||||
private async Task LoadAndApplyFilters()
|
private async Task LoadAndApplyFilters()
|
||||||
{
|
{
|
||||||
if(this.DataSourceOptions.DisableDataSources)
|
if(this.DataSourceOptions.DisableDataSources)
|
||||||
|
|||||||
Reference in new issue
Block a user