mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-23 08:13:49 +00:00
Moved the background agents to AI operations (#1215)
This commit is contained in:
1 parent
8a4a26503b
commit
c50a93cd17
139 files changed
+4069
-2340
No files matched your search
@@ -48,7 +48,7 @@ public sealed class Data
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// A list of its own rather than a part of DataSources: classic RAG, Semantic Search and the
|
||||
/// agents read DataSources, and none of them is meant to see a mailbox. It also keeps the
|
||||
/// AI operations read DataSources, and none of them is meant to see a mailbox. It also keeps the
|
||||
/// settings readable for older versions of AI Studio, so the settings version stays the same.
|
||||
/// An older version skips a property it does not know, but would fail to read the whole file
|
||||
/// over a data source type it does not know. It drops the list, though, the next time it stores
|
||||
@@ -193,7 +193,7 @@ public sealed class Data
|
||||
|
||||
public DataSWOTAnalysis SWOTAnalysis { get; set; } = new();
|
||||
|
||||
public DataTextContentCleaner TextContentCleaner { get; set; } = new();
|
||||
public DataTextContentCleaner TextContentCleaner { get; set; } = new(x => x.TextContentCleaner);
|
||||
|
||||
public DataAgentDataSourceSelection AgentDataSourceSelection { get; set; } = new(x => x.AgentDataSourceSelection);
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using System.Linq.Expressions;
|
||||
|
||||
using AIStudio.Provider;
|
||||
|
||||
namespace AIStudio.Settings.DataModel;
|
||||
|
||||
public sealed class DataAgentDataSourceSelection(Expression<Func<Data, DataAgentDataSourceSelection>>? configSelection = null)
|
||||
@@ -20,4 +22,12 @@ public sealed class DataAgentDataSourceSelection(Expression<Func<Data, DataAgent
|
||||
/// Preselect a data source selection provider?
|
||||
/// </summary>
|
||||
public string PreselectedAgentProvider { get; set; } = ManagedConfiguration.Register(configSelection, n => n.PreselectedAgentProvider, string.Empty);
|
||||
|
||||
/// <summary>
|
||||
/// The minimum confidence level of the provider which selects the data sources.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// It applies only while PreselectAgentOptions is on, and then to every provider which selects them, the fallbacks included.
|
||||
/// </remarks>
|
||||
public ConfidenceLevel MinimumProviderConfidence { get; set; } = ManagedConfiguration.Register(configSelection, n => n.MinimumProviderConfidence, ConfidenceLevel.NONE);
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
using System.Linq.Expressions;
|
||||
|
||||
using AIStudio.Provider;
|
||||
|
||||
namespace AIStudio.Settings.DataModel;
|
||||
|
||||
public sealed class DataAgentRetrievalContextValidation(Expression<Func<Data, DataAgentRetrievalContextValidation>>? configSelection = null)
|
||||
@@ -12,7 +14,7 @@ public sealed class DataAgentRetrievalContextValidation(Expression<Func<Data, Da
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enable the retrieval context validation agent?
|
||||
/// Enable the retrieval context validation?
|
||||
/// </summary>
|
||||
public bool EnableRetrievalContextValidation { get; set; } = ManagedConfiguration.Register(configSelection, n => n.EnableRetrievalContextValidation, false);
|
||||
|
||||
@@ -26,6 +28,14 @@ public sealed class DataAgentRetrievalContextValidation(Expression<Func<Data, Da
|
||||
/// </summary>
|
||||
public string PreselectedAgentProvider { get; set; } = ManagedConfiguration.Register(configSelection, n => n.PreselectedAgentProvider, string.Empty);
|
||||
|
||||
/// <summary>
|
||||
/// The minimum confidence level of the provider which validates the retrieval contexts.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// It applies only while PreselectAgentOptions is on, and then to every provider which validates them, the fallbacks included.
|
||||
/// </remarks>
|
||||
public ConfidenceLevel MinimumProviderConfidence { get; set; } = ManagedConfiguration.Register(configSelection, n => n.MinimumProviderConfidence, ConfidenceLevel.NONE);
|
||||
|
||||
/// <summary>
|
||||
/// Configure how many parallel validations to run.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using System.Linq.Expressions;
|
||||
using AIStudio.Agents.AssistantAudit;
|
||||
|
||||
using AIStudio.AIOperations.PluginAudit;
|
||||
using AIStudio.Provider;
|
||||
|
||||
namespace AIStudio.Settings.DataModel;
|
||||
|
||||
@@ -26,10 +28,18 @@ public sealed class DataAssistantPluginAudit(Expression<Func<Data, DataAssistant
|
||||
/// </summary>
|
||||
public string PreselectedAgentProvider { get; set; } = ManagedConfiguration.Register(configSelection, n => n.PreselectedAgentProvider, string.Empty);
|
||||
|
||||
/// <summary>
|
||||
/// The minimum confidence level of the provider which audits the plugins.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// It applies to every provider which audits a plugin, the fallbacks included.
|
||||
/// </remarks>
|
||||
public ConfidenceLevel MinimumProviderConfidence { get; set; } = ManagedConfiguration.Register(configSelection, n => n.MinimumProviderConfidence, ConfidenceLevel.NONE);
|
||||
|
||||
/// <summary>
|
||||
/// The minimum audit level assistant plugins should meet.
|
||||
/// </summary>
|
||||
public AssistantAuditLevel MinimumLevel { get; set; } = ManagedConfiguration.Register(configSelection, n => n.MinimumLevel, AssistantAuditLevel.CAUTION);
|
||||
public PluginAuditLevel MinimumLevel { get; set; } = ManagedConfiguration.Register(configSelection, n => n.MinimumLevel, PluginAuditLevel.CAUTION);
|
||||
|
||||
/// <summary>
|
||||
/// Should activation be blocked when the audit result is below the minimum level?
|
||||
|
||||
@@ -20,7 +20,7 @@ public class DataLegalCheck
|
||||
public bool PreselectWebContentReader { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Preselect the content cleaner agent?
|
||||
/// Preselect the text content cleaner?
|
||||
/// </summary>
|
||||
public bool PreselectContentCleanerAgent { get; set; }
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ public sealed class DataSWOTAnalysis
|
||||
public bool PreselectWebContentReader { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Preselect the content cleaner agent?
|
||||
/// Preselect the text content cleaner?
|
||||
/// </summary>
|
||||
public bool PreselectContentCleanerAgent { get; set; }
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace AIStudio.Settings.DataModel;
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Mailboxes are kept in Data.Mailboxes rather than in DataSources, which is why this is no
|
||||
/// IDataSource: classic RAG, Semantic Search and the agents never see a mailbox. Only the mail
|
||||
/// IDataSource: classic RAG, Semantic Search and the AI operations never see a mailbox. Only the mail
|
||||
/// tools read from one.
|
||||
/// </remarks>
|
||||
public record struct DataSourceMailbox: IIndexedDataSource, ISecretId
|
||||
|
||||
@@ -7,14 +7,14 @@ public enum DataSourceRetrievalMode
|
||||
{
|
||||
/// <summary>
|
||||
/// The model searches the data sources itself, through the tool semantic_search, whenever a
|
||||
/// question calls for it. No agent takes part: the chat model picks the data sources and
|
||||
/// question calls for it. No AI operation takes part: the chat model picks the data sources and
|
||||
/// judges what it found.
|
||||
/// </summary>
|
||||
SEMANTIC_SEARCH,
|
||||
|
||||
/// <summary>
|
||||
/// AI Studio searches the data sources with every message, before the model answers. This is
|
||||
/// the classic RAG process, with its agents for selecting data sources and for validating what
|
||||
/// the classic RAG process, with its AI operations for selecting data sources and for validating what
|
||||
/// was found.
|
||||
/// </summary>
|
||||
EVERY_MESSAGE,
|
||||
|
||||
@@ -1,14 +1,33 @@
|
||||
using System.Linq.Expressions;
|
||||
|
||||
using AIStudio.Provider;
|
||||
|
||||
namespace AIStudio.Settings.DataModel;
|
||||
|
||||
public sealed class DataTextContentCleaner
|
||||
public sealed class DataTextContentCleaner(Expression<Func<Data, DataTextContentCleaner>>? configSelection = null)
|
||||
{
|
||||
/// <summary>
|
||||
/// The default constructor for the JSON deserializer.
|
||||
/// </summary>
|
||||
public DataTextContentCleaner() : this(null)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Preselect any text content cleaner options?
|
||||
/// </summary>
|
||||
public bool PreselectAgentOptions { get; set; }
|
||||
public bool PreselectAgentOptions { get; set; } = ManagedConfiguration.Register(configSelection, n => n.PreselectAgentOptions, false);
|
||||
|
||||
/// <summary>
|
||||
/// Preselect a text content cleaner provider?
|
||||
/// </summary>
|
||||
public string PreselectedAgentProvider { get; set; } = string.Empty;
|
||||
public string PreselectedAgentProvider { get; set; } = ManagedConfiguration.Register(configSelection, n => n.PreselectedAgentProvider, string.Empty);
|
||||
|
||||
/// <summary>
|
||||
/// The minimum confidence level of the provider which cleans the text content.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// It applies only while PreselectAgentOptions is on, and then to every provider which cleans it, the fallbacks included.
|
||||
/// </remarks>
|
||||
public ConfidenceLevel MinimumProviderConfidence { get; set; } = ManagedConfiguration.Register(configSelection, n => n.MinimumProviderConfidence, ConfidenceLevel.NONE);
|
||||
}
|
||||
@@ -22,7 +22,7 @@ public sealed class DataTextSummarizer
|
||||
public bool PreselectWebContentReader { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Preselect the content cleaner agent?
|
||||
/// Preselect the text content cleaner?
|
||||
/// </summary>
|
||||
public bool PreselectContentCleanerAgent { get; set; }
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ public sealed class DataTranslation
|
||||
public bool PreselectWebContentReader { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Preselect the content cleaner agent?
|
||||
/// Preselect the text content cleaner?
|
||||
/// </summary>
|
||||
public bool PreselectContentCleanerAgent { get; set; }
|
||||
|
||||
|
||||
Reference in new issue
Block a user