diff --git a/AGENTS.md b/AGENTS.md index 1955cc2eb..bd8069735 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -36,6 +36,7 @@ Therefore, before you plan, read, or change anything in one of these areas, read | a release, or crediting a contributor in a changelog entry or after a merge | `app/Build/AGENTS.md` | | anything under `app/MindWork AI Studio/Tools/PluginSystem/`, or a new capability of configuration plugins | `app/MindWork AI Studio/Tools/PluginSystem/AGENTS.md` | | anything under `app/MindWork AI Studio/Tools/ToolCallingSystem/` | `app/MindWork AI Studio/Tools/ToolCallingSystem/AGENTS.md` | +| anything under `app/MindWork AI Studio/AIOperations/` or `app/Tests/AIOperations/`, or a new task which AI Studio hands to a model on its own | `app/MindWork AI Studio/AIOperations/AGENTS.md` | | anything under `app/MindWork AI Studio/Models/` or `app/Tests/Models/` | `app/MindWork AI Studio/Models/AGENTS.md` | | anything under `app/MindWork AI Studio/Tools/Services/Indexing/`, or `DataSourceEmbeddingService` | `app/MindWork AI Studio/Tools/Services/Indexing/AGENTS.md` | | anything under `app/MindWork AI Studio/Tools/Databases/` | `app/MindWork AI Studio/Tools/Databases/AGENTS.md` | diff --git a/app/AGENTS.md b/app/AGENTS.md index a83bf886e..265aaf564 100644 --- a/app/AGENTS.md +++ b/app/AGENTS.md @@ -15,9 +15,9 @@ Key structure: - **Chat/** - Chat functionality and message handling - **Assistants/** - Pre-configured assistants (translation, summarization, coding, etc.) - `AssistantBase.razor` - Base component for all assistants -- **Agents/** - contains all agents, e.g., for data source selection, context validation, etc. - - `AgentDataSourceSelection.cs` - Selects appropriate data sources for queries - - `AgentRetrievalContextValidation.cs` - Validates retrieved context relevance +- **AIOperations/** - tasks which AI Studio hands to a model on its own, one request in and one result out, + e.g., the data source selection and the retrieval context validation of the classic RAG process; see the + area guide `AIOperations/AGENTS.md` - **Tools/PluginSystem/** - Lua-based plugin system - **Tools/Services/** - Core background services (settings, message bus, data sources, updates) - **Tools/Rust/** - .NET wrapper for Rust API calls @@ -143,8 +143,8 @@ knowledge. RAG is available as a beta preview feature. Architecture: - **External Retrieval Interface (ERI)** - Contract for integrating external data sources - **Data Sources** - Local files and external data via ERI servers -- **Two ways to search** - By default, the chat model searches the data sources itself through the tool `semantic_search`, whenever a question calls for it. The classic process (`AISrcSelWithRetCtxVal`) searches them with every message instead, when the user chose so per chat (`DataSourceOptions.RetrievalMode`) or whenever the tool cannot be offered. `ToolRegistry.GetEffectiveRetrievalModeAsync` decides between the two; pass its answer to `DataSourceService`, because the agents only count as providers that see the data when they actually run. Both ways decide where a chat may still send data once their passages reached it through `DataSourceRequirements.Of`, never with a check of their own: a way which demands less leaves the other one open. See "Searching Data Sources" in `documentation/Tools.md`. -- **Agents** - AI agents select data sources and validate retrieval quality, in the classic process only +- **Two ways to search** - By default, the chat model searches the data sources itself through the tool `semantic_search`, whenever a question calls for it. The classic process (`AISrcSelWithRetCtxVal`) searches them with every message instead, when the user chose so per chat (`DataSourceOptions.RetrievalMode`) or whenever the tool cannot be offered. `ToolRegistry.GetEffectiveRetrievalModeAsync` decides between the two; pass its answer to `DataSourceService`, because the AI operations of the classic process only count as providers that see the data when they actually run. Both ways decide where a chat may still send data once their passages reached it through `DataSourceRequirements.Of`, never with a check of their own: a way which demands less leaves the other one open. See "Searching Data Sources" in `documentation/Tools.md`. +- **AI operations** - select data sources and validate retrieval quality, in the classic process only; see `AIOperations/AGENTS.md` - **Embedding providers** - Support for various embedding models - **Vector database** - Qdrant Edge, embedded in the Rust runtime; see "Databases" below - **Index database** - SQLite, holding the file fingerprints and the chunk texts for full-text search; see "Databases" below diff --git a/app/MindWork AI Studio/AIOperations/AGENTS.md b/app/MindWork AI Studio/AIOperations/AGENTS.md new file mode 100644 index 000000000..35c271155 --- /dev/null +++ b/app/MindWork AI Studio/AIOperations/AGENTS.md @@ -0,0 +1,88 @@ +# AGENTS.md + +These instructions cover the AI operations in `app/MindWork AI Studio/AIOperations/`. They add to the +`AGENTS.md` in the repository root, which applies here as well. + +## What an AI operation is + +An AI operation is a task which AI Studio hands to a model on its own: one request in, one result out, without +a loop. The text content cleaner, the data source selection and the retrieval context validation of the +classic RAG process, and the security audit of plugins are AI operations. A conversation with the user, a loop +of tool calls, or an agent which plans its own steps is not one. + +The common types live in this folder; each operation lives in a folder of its own, `AIOperations//`, +with `Operation`, `Request`, and its result types. + +**Never name a folder after a type of the app.** Its namespace `AIStudio.AIOperations.` would hide that +type wherever the namespace is in reach (CS0118). The component `DataSourceSelection` exists, so the +operation which selects data sources lives in `DataSourceChoice/`. + +## The parts + +- **`IAIOperation`** - `Id` for the log, `Component` for the User-Agent and + `ChatThread.RuntimeComponent`, `GetRequiredConfidence(request)`, and `RunAsync(request, context, token)`. + The required confidence comes from the content of the request alone, e.g., its data sources or the + confidence a chat requires; the minimum of the operation is a setting and not part of it. +- **`AIOperationBase`** - `AskAsync` sends one request with a chat thread of its own to the + provider of the context and waits for the whole answer. Right before, it checks the provider once more + against a prohibition, the global minimum, and the confidence the request requires, but not against the + minimum of the operation, because a caller may exempt a fallback from it. +- **`AIOperationContext`** - what a call runs with apart from its request, the provider above all. +- **`GetProviderSettings(SettingsManager)`** - every operation declares this public static method, which + reads its preferred provider and its minimum confidence fresh on every call. It is static, so that a service + learns which provider would run without an instance. `AIOperationsAreStatelessTests` checks that it exists. + +## Thread safety + +Every operation is registered as a singleton in `Program.cs` and serves several callers at once, e.g., two +chats with RAG. It therefore keeps nothing of a call: no writable field or property, only the services of +its primary constructor, which are singletons as well. Everything a call needs lives in local variables or +travels with the request and the context. A limit per call, such as the parallel validations of retrieval +contexts, is a local `SemaphoreSlim`. `AIOperationsAreStatelessTests` checks both the state and the +registration. + +## Choosing the provider + +The caller chooses the provider of a call and passes it in the `AIOperationContext`; an operation never +chooses one itself. + +- **`AIOperationProviderChoice.Choose`** decides, a pure function on the facts about each candidate + (`AIOperationProviderCandidate`) and the confidence levels to reach (`AIOperationProviderRules`). The + preferred provider of the operation wins when it passes every rule; otherwise the first fallback in the + order of the caller which passes. A prohibition, the global minimum, the confidence the request requires, + and the check of the caller apply to every candidate; the minimum of the operation applies to the fallbacks + only when the caller says so. +- **`AIOperationProviderIssue`** - why a candidate failed, in the order of the checks. The choice reports the + issue of the preferred provider and, when nothing was chosen, of the first named fallback. Explain a choice + to the user from these issues; never guess the reason afterward. +- **`AIOperationProviderResolver`** gathers the facts from the settings. Call `Resolve` right before running + an operation, which logs the choice, and `Preview` for a check in advance or a hint in the UI. +- **`AIOperationProviderOptions`** - what the caller adds: the fallbacks in order, whether the minimum of the + operation applies to them, and a check of its own, e.g., whether a provider may see the data sources. The + app-wide default is `SettingsManager.AppDefaultProviderId`. + +Build the options of a caller in one place, so that a check in advance counts the providers which run: +`ClassicRagProviderOptions` serves the classic RAG process and `DataSourceService`, +`AssistantPluginAuditService.GetProviderOptions` the audit, and `ReadWebContent.GetCleanerProviderOptions` the +text content cleaner. + +## Settings + +Each operation has a preferred provider and a minimum confidence in its settings data class, managed through +`ManagedConfiguration` and documented in `Plugins/configuration/plugin.lua`. With a switch such as +`PreselectAgentOptions`, both apply only while it is on, like the settings of the assistants. Add the minimum +to `ComponentsExtensions.MinimumConfidence` as well, so that the provider selections of the settings filter by +it. + +## Answers with JSON + +Find the JSON in an answer with `ModelAnswerJson` and read it with `AIOperationsJson.OPTIONS`. A new JSON type +goes into `AIOperationsJsonContext` and into `JsonTestRoots.ModelAnswers` in `app/Tests/Serialization/`. Give +a result an explicit way to say that the model gave no usable answer, such as `IsAnswered`, instead of a value +which stands for it. + +## Tests + +The tests live in `app/Tests/AIOperations/`: the choice as a table (`AIOperationProviderChoiceTests`), the +resolver on real settings (`AIOperationProviderResolverTests`), the statelessness of all operations, and per +operation the options its callers pass (`ProviderTests`). \ No newline at end of file diff --git a/app/MindWork AI Studio/AIOperations/AIOperationBase.cs b/app/MindWork AI Studio/AIOperations/AIOperationBase.cs new file mode 100644 index 000000000..aadfaf4ca --- /dev/null +++ b/app/MindWork AI Studio/AIOperations/AIOperationBase.cs @@ -0,0 +1,128 @@ +using AIStudio.Chat; +using AIStudio.Provider; +using AIStudio.Settings; + +namespace AIStudio.AIOperations; + +/// +/// The base of the AI operations, with what each of them needs to ask a model. +/// +/// +/// It keeps nothing of a call: every request gets a chat thread of its own, and the provider comes with the +/// context. Derived operations keep it that way, see IAIOperation; AIOperationsAreStatelessTests checks it. +/// +/// What the operation works on. +/// What the operation returns. +public abstract class AIOperationBase(ILogger logger, SettingsManager settingsManager) : IAIOperation +{ + protected ILogger Logger { get; } = logger; + + protected SettingsManager SettingsManager { get; } = settingsManager; + + #region Implementation of IAIOperation + + /// + public abstract string Id { get; } + + /// + public abstract Tools.Components Component { get; } + + /// + public abstract ConfidenceLevel GetRequiredConfidence(TRequest request); + + /// + public abstract Task RunAsync(TRequest request, AIOperationContext context, CancellationToken token = default); + + #endregion + + /// + /// Sends one request to the provider of the context and waits for the whole answer. + /// + /// + /// The provider is checked once more right before: the organization must not have prohibited it, and it + /// has to reach the global minimum and the confidence the content of the request requires. The minimum + /// of the operation itself is not checked here, because a caller may exempt a fallback from it. + /// + /// The request, for the confidence its content requires. + /// What the call runs with, the provider above all. + /// The system prompt. + /// The user prompt. + /// The cancellation token. + /// The text of the answer, or null when the provider must not see the request or did not answer. + protected async Task AskAsync(TRequest request, AIOperationContext context, string systemPrompt, string userPrompt, CancellationToken token) + { + var provider = context.Provider; + if (!this.MayAsk(provider, request)) + return null; + + var thread = new ChatThread + { + WorkspaceId = Guid.Empty, + ChatId = Guid.NewGuid(), + Name = string.Empty, + SystemPrompt = systemPrompt, + Blocks = [], + RuntimeComponent = this.Component, + }; + + var time = DateTimeOffset.Now; + var prompt = new ContentText + { + Text = userPrompt, + }; + + thread.Blocks.Add(new ContentBlock + { + Time = time, + ContentType = ContentType.TEXT, + Role = ChatRole.USER, + Content = prompt, + }); + + var answer = new ContentText + { + // We have to wait for the remote for the content stream: + InitialRemoteWait = true, + }; + + thread.Blocks.Add(new ContentBlock + { + Time = time, + ContentType = ContentType.TEXT, + Role = ChatRole.AI, + Content = answer, + }); + + // Awaiting this line waits for the entire content to be streamed: + await answer.CreateFromProviderAsync(provider.CreateProvider(), provider.Model, prompt, thread, token); + if (string.IsNullOrWhiteSpace(answer.Text)) + { + this.Logger.LogWarning($"The AI operation '{this.Id}' got no answer from the provider '{provider.InstanceName}'."); + return null; + } + + return answer.Text; + } + + private bool MayAsk(Settings.Provider provider, TRequest request) + { + if (provider == Settings.Provider.NONE || provider.UsedLLMProvider is LLMProviders.NONE) + { + this.Logger.LogWarning($"The AI operation '{this.Id}' has no provider."); + return false; + } + + var minimumLevel = this.SettingsManager.GlobalMinimumConfidenceLevel; + var requiredLevel = this.GetRequiredConfidence(request); + if (requiredLevel > minimumLevel) + minimumLevel = requiredLevel; + + if (!this.SettingsManager.IsProviderUsable(provider.UsedLLMProvider, minimumLevel)) + { + this.Logger.LogWarning($"The AI operation '{this.Id}' must not use the provider '{provider.InstanceName}': the organization prohibited it, or its confidence is below '{minimumLevel.Name}'."); + return false; + } + + return true; + } +} \ No newline at end of file diff --git a/app/MindWork AI Studio/AIOperations/AIOperationContext.cs b/app/MindWork AI Studio/AIOperations/AIOperationContext.cs new file mode 100644 index 000000000..25ba7adf7 --- /dev/null +++ b/app/MindWork AI Studio/AIOperations/AIOperationContext.cs @@ -0,0 +1,7 @@ +namespace AIStudio.AIOperations; + +/// +/// What a call of an AI operation runs with, apart from its request. +/// +/// The provider which the caller chose for this call, usually through AIOperationProviderResolver. +public sealed record AIOperationContext(Settings.Provider Provider); \ No newline at end of file diff --git a/app/MindWork AI Studio/AIOperations/AIOperationProviderCandidate.cs b/app/MindWork AI Studio/AIOperations/AIOperationProviderCandidate.cs new file mode 100644 index 000000000..bdbc6fc86 --- /dev/null +++ b/app/MindWork AI Studio/AIOperations/AIOperationProviderCandidate.cs @@ -0,0 +1,29 @@ +using AIStudio.Provider; + +namespace AIStudio.AIOperations; + +/// +/// What is known about one provider which an AI operation might use. +/// +/// +/// AIOperationProviderResolver gathers these facts from the settings, and AIOperationProviderChoice decides +/// on them alone. That keeps the decision apart from the settings and easy to test. +/// +/// The configured provider; Provider.NONE when nobody named one or when it is missing. +/// Whether somebody named a provider here at all. +/// Whether the named provider is configured. +/// Whether the organization prohibited the provider. +/// The confidence level of the provider. +/// What the check of the caller found; NONE when the provider passed it or when there is no such check. +public sealed record AIOperationProviderCandidate(Settings.Provider Provider, bool IsNamed, bool Exists, bool IsProhibited, ConfidenceLevel Confidence, AIOperationProviderIssue CallerIssue) +{ + /// + /// A candidate which nobody named. + /// + public static readonly AIOperationProviderCandidate NOT_NAMED = new(Settings.Provider.NONE, false, false, false, ConfidenceLevel.NONE, AIOperationProviderIssue.NONE); + + /// + /// A candidate whose provider is no longer configured. + /// + public static readonly AIOperationProviderCandidate MISSING = new(Settings.Provider.NONE, true, false, false, ConfidenceLevel.NONE, AIOperationProviderIssue.NONE); +} \ No newline at end of file diff --git a/app/MindWork AI Studio/AIOperations/AIOperationProviderChoice.cs b/app/MindWork AI Studio/AIOperations/AIOperationProviderChoice.cs new file mode 100644 index 000000000..6964934a3 --- /dev/null +++ b/app/MindWork AI Studio/AIOperations/AIOperationProviderChoice.cs @@ -0,0 +1,90 @@ +namespace AIStudio.AIOperations; + +/// +/// The provider chosen for an AI operation, together with the reasons why others were not chosen. +/// +/// +/// The reasons let a caller explain the choice instead of guessing it, e.g., why the model of the +/// assistant cleaned a web page although the user picked another one for that. +/// +/// The chosen provider; Provider.NONE when no candidate passed. +/// Why the preferred provider of the operation was not chosen: NONE when it was, NOT_SET when there is none. +/// Only when no provider was chosen: why the first named fallback failed, NOT_SET when the caller named none. NONE otherwise. +public sealed record AIOperationProviderChoice(Settings.Provider Provider, AIOperationProviderIssue PreferredIssue, AIOperationProviderIssue FallbackIssue) +{ + /// + /// Whether a provider was chosen. + /// + public bool HasProvider => this.Provider != Settings.Provider.NONE; + + /// + /// Whether a fallback was chosen instead of the preferred provider. + /// + public bool UsesFallback => this.HasProvider && this.PreferredIssue is not AIOperationProviderIssue.NONE; + + /// + /// Chooses the provider for an AI operation from the facts about its candidates. + /// + /// + /// + /// The preferred provider wins when somebody named it, when it exists, when the organization did not + /// prohibit it, when it reaches the global minimum, the minimum of the operation, and the confidence the + /// content requires, and when it passes the check of the caller. + /// + /// + /// Otherwise, the first fallback in the order of the caller wins which passes the same. The minimum of + /// the operation applies to the fallbacks only when the rules say so; a prohibition, the global minimum, + /// the confidence the content requires, and the check of the caller apply to every candidate. + /// + /// + /// The provider picked for the operation itself. + /// The providers to fall back on, in the order of the caller. + /// The confidence levels to reach. + /// The chosen provider with the reasons why the others were not chosen. + public static AIOperationProviderChoice Choose(AIOperationProviderCandidate preferred, IReadOnlyList fallbacks, AIOperationProviderRules rules) + { + var preferredIssue = Check(preferred, rules, false); + if (preferredIssue is AIOperationProviderIssue.NONE) + return new(preferred.Provider, AIOperationProviderIssue.NONE, AIOperationProviderIssue.NONE); + + // A named candidate never reports NOT_SET, so this stays NOT_SET until the first named fallback fails: + var fallbackIssue = AIOperationProviderIssue.NOT_SET; + foreach (var fallback in fallbacks) + { + var issue = Check(fallback, rules, true); + if (issue is AIOperationProviderIssue.NONE) + return new(fallback.Provider, preferredIssue, AIOperationProviderIssue.NONE); + + if (fallbackIssue is AIOperationProviderIssue.NOT_SET) + fallbackIssue = issue; + } + + return new(Settings.Provider.NONE, preferredIssue, fallbackIssue); + } + + /// + /// Finds the first rule a candidate breaks, in the order of AIOperationProviderIssue. + /// + private static AIOperationProviderIssue Check(AIOperationProviderCandidate candidate, AIOperationProviderRules rules, bool isFallback) + { + if (!candidate.IsNamed) + return AIOperationProviderIssue.NOT_SET; + + if (!candidate.Exists) + return AIOperationProviderIssue.MISSING; + + if (candidate.IsProhibited) + return AIOperationProviderIssue.PROHIBITED; + + if (candidate.Confidence < rules.GlobalMinimumConfidence) + return AIOperationProviderIssue.BELOW_MINIMUM_CONFIDENCE; + + if ((!isFallback || rules.OwnMinimumAppliesToFallbacks) && candidate.Confidence < rules.OwnMinimumConfidence) + return AIOperationProviderIssue.BELOW_MINIMUM_CONFIDENCE; + + if (candidate.Confidence < rules.RequiredConfidence) + return AIOperationProviderIssue.NOT_ALLOWED_FOR_CONTENT; + + return candidate.CallerIssue; + } +} \ No newline at end of file diff --git a/app/MindWork AI Studio/AIOperations/AIOperationProviderIssue.cs b/app/MindWork AI Studio/AIOperations/AIOperationProviderIssue.cs new file mode 100644 index 000000000..f2185bf7c --- /dev/null +++ b/app/MindWork AI Studio/AIOperations/AIOperationProviderIssue.cs @@ -0,0 +1,53 @@ +namespace AIStudio.AIOperations; + +/// +/// Why a provider was not chosen for an AI operation. +/// +/// +/// The members follow the order in which AIOperationProviderChoice checks a candidate, so that a candidate +/// reports the first rule it breaks. +/// +public enum AIOperationProviderIssue +{ + /// + /// Nothing stands in the way of the provider. + /// + NONE = 0, + + /// + /// Nobody named a provider here. + /// + /// + /// That is no problem to report: an operation without a provider of its own falls back as intended. + /// + NOT_SET, + + /// + /// The named provider is no longer configured, e.g., because the user deleted it. + /// + MISSING, + + /// + /// The organization prohibited the provider. + /// + PROHIBITED, + + /// + /// The confidence level of the provider is below the global minimum or below the minimum of the operation. + /// + BELOW_MINIMUM_CONFIDENCE, + + /// + /// The content of the request must not reach the provider. + /// + /// + /// Either the confidence level of the provider is below what the content requires, or a check of the + /// caller refused the provider, e.g., for the security of a data source or the restrictions of a chat. + /// + NOT_ALLOWED_FOR_CONTENT, + + /// + /// A check of the caller found the context window of the model too small for the operation. + /// + CONTEXT_WINDOW_TOO_SMALL, +} \ No newline at end of file diff --git a/app/MindWork AI Studio/AIOperations/AIOperationProviderOptions.cs b/app/MindWork AI Studio/AIOperations/AIOperationProviderOptions.cs new file mode 100644 index 000000000..e88dd3b3f --- /dev/null +++ b/app/MindWork AI Studio/AIOperations/AIOperationProviderOptions.cs @@ -0,0 +1,34 @@ +namespace AIStudio.AIOperations; + +/// +/// What the caller of an AI operation adds to the choice of its provider. +/// +public sealed record AIOperationProviderOptions +{ + /// + /// The IDs of the providers to fall back on when the preferred provider of the operation cannot be used, in order. + /// + /// + /// An empty ID is allowed and stands for a fallback nobody named, e.g., an assistant without a provider. + /// + public IReadOnlyList FallbackProviderIds { get; init; } = []; + + /// + /// Whether the minimum confidence of the operation applies to the fallbacks as well. + /// + /// + /// Usually it does: a provider somebody picked for something else has to clear the bar of the operation, + /// otherwise a provider ruled out for it would still see its content. A caller turns it off where the + /// fallback saw the content anyway, e.g., the model of a chat which summarizes that very chat. + /// + public bool OwnMinimumConfidenceAppliesToFallbacks { get; init; } = true; + + /// + /// An optional check of the caller, applied to every configured candidate. + /// + /// + /// It returns NONE when the provider passes, and otherwise the issue to report, usually + /// NOT_ALLOWED_FOR_CONTENT or CONTEXT_WINDOW_TOO_SMALL. + /// + public Func? CheckProvider { get; init; } +} \ No newline at end of file diff --git a/app/MindWork AI Studio/AIOperations/AIOperationProviderResolver.cs b/app/MindWork AI Studio/AIOperations/AIOperationProviderResolver.cs new file mode 100644 index 000000000..43af5d360 --- /dev/null +++ b/app/MindWork AI Studio/AIOperations/AIOperationProviderResolver.cs @@ -0,0 +1,78 @@ +using AIStudio.Provider; +using AIStudio.Settings; + +namespace AIStudio.AIOperations; + +/// +/// Chooses the provider for a call of an AI operation. +/// +/// +/// It gathers the facts about each candidate from the settings, fresh on every call, and leaves the decision +/// to AIOperationProviderChoice.Choose. Every caller which runs an operation chooses through it, and so does +/// every check which needs to know in advance which provider would see the content, so that the two never +/// drift apart. +/// +public sealed class AIOperationProviderResolver(SettingsManager settingsManager, ILogger logger) +{ + /// + /// Chooses the provider for running an operation with the given request, and logs the choice. + /// + /// The operation to run. + /// The request to run it with. + /// The provider settings of the operation, from its GetProviderSettings. + /// What the caller adds: the fallbacks, whether the minimum of the operation applies to them, and a check of its own. + /// The chosen provider with the reasons why the others were not chosen. + public AIOperationProviderChoice Resolve(IAIOperation operation, TRequest request, AIOperationProviderSettings settings, AIOperationProviderOptions options) + { + var choice = this.Preview(settings, operation.GetRequiredConfidence(request), options); + if (choice.HasProvider) + { + var provider = choice.Provider; + var fallbackNote = choice.UsesFallback ? $" as a fallback, since its preferred provider was {choice.PreferredIssue}" : string.Empty; + logger.LogInformation($"The AI operation '{operation.Id}' uses the provider '{provider.InstanceName}' ({provider.UsedLLMProvider.Name}, confidence={provider.UsedLLMProvider.GetConfidence(settingsManager).Level.Name}){fallbackNote}."); + } + else + logger.LogWarning($"The AI operation '{operation.Id}' has no provider: its preferred provider was {choice.PreferredIssue}, its first fallback was {choice.FallbackIssue}."); + + return choice; + } + + /// + /// Chooses the provider which would run an operation, without logging the choice. + /// + /// + /// For checks in advance, e.g., which providers get to see the data of a data source. + /// + /// The provider settings of the operation, from its GetProviderSettings. + /// The confidence level the content of the request requires; NONE when it is not known yet. + /// What the caller adds: the fallbacks, whether the minimum of the operation applies to them, and a check of its own. + /// The chosen provider with the reasons why the others were not chosen. + public AIOperationProviderChoice Preview(AIOperationProviderSettings settings, ConfidenceLevel requiredConfidence, AIOperationProviderOptions options) + { + var preferred = this.Describe(settings.PreferredProviderId, options.CheckProvider); + var fallbacks = options.FallbackProviderIds.Select(id => this.Describe(id, options.CheckProvider)).ToList(); + var rules = new AIOperationProviderRules(settingsManager.GlobalMinimumConfidenceLevel, settings.MinimumConfidence, requiredConfidence, options.OwnMinimumConfidenceAppliesToFallbacks); + return AIOperationProviderChoice.Choose(preferred, fallbacks, rules); + } + + /// + /// Gathers the facts about the provider with the given ID. + /// + private AIOperationProviderCandidate Describe(string? providerId, Func? checkProvider) + { + if (string.IsNullOrWhiteSpace(providerId) || string.Equals(providerId, Settings.Provider.NONE.Id, StringComparison.OrdinalIgnoreCase)) + return AIOperationProviderCandidate.NOT_NAMED; + + var provider = settingsManager.GetProviderById(providerId); + if (provider == Settings.Provider.NONE || provider.UsedLLMProvider is LLMProviders.NONE) + return AIOperationProviderCandidate.MISSING; + + return new AIOperationProviderCandidate( + provider, + true, + true, + settingsManager.IsProviderProhibited(provider.UsedLLMProvider), + provider.UsedLLMProvider.GetConfidence(settingsManager).Level, + checkProvider?.Invoke(provider) ?? AIOperationProviderIssue.NONE); + } +} \ No newline at end of file diff --git a/app/MindWork AI Studio/AIOperations/AIOperationProviderRules.cs b/app/MindWork AI Studio/AIOperations/AIOperationProviderRules.cs new file mode 100644 index 000000000..6c70637c1 --- /dev/null +++ b/app/MindWork AI Studio/AIOperations/AIOperationProviderRules.cs @@ -0,0 +1,12 @@ +using AIStudio.Provider; + +namespace AIStudio.AIOperations; + +/// +/// The confidence levels which a provider has to reach for an AI operation. +/// +/// The global minimum, when the user or the organization enforces one. It applies to every candidate. +/// The minimum of the operation itself, from its settings. +/// What the content of the request requires, e.g., its data sources. It applies to every candidate. +/// Whether the minimum of the operation applies to the fallbacks as well, not only to its preferred provider. +public sealed record AIOperationProviderRules(ConfidenceLevel GlobalMinimumConfidence, ConfidenceLevel OwnMinimumConfidence, ConfidenceLevel RequiredConfidence, bool OwnMinimumAppliesToFallbacks); \ No newline at end of file diff --git a/app/MindWork AI Studio/AIOperations/AIOperationProviderSettings.cs b/app/MindWork AI Studio/AIOperations/AIOperationProviderSettings.cs new file mode 100644 index 000000000..8df02e473 --- /dev/null +++ b/app/MindWork AI Studio/AIOperations/AIOperationProviderSettings.cs @@ -0,0 +1,16 @@ +using AIStudio.Provider; + +namespace AIStudio.AIOperations; + +/// +/// The settings of an AI operation which decide its provider. +/// +/// The ID of the provider picked for the operation; empty when nobody picked one or when the preselection is switched off. +/// The minimum confidence level of the operation itself. +public sealed record AIOperationProviderSettings(string PreferredProviderId, ConfidenceLevel MinimumConfidence) +{ + /// + /// No provider of its own and no minimum. + /// + public static readonly AIOperationProviderSettings NONE = new(string.Empty, ConfidenceLevel.NONE); +} \ No newline at end of file diff --git a/app/MindWork AI Studio/AIOperations/AIOperationsJson.cs b/app/MindWork AI Studio/AIOperations/AIOperationsJson.cs new file mode 100644 index 000000000..40c55ab45 --- /dev/null +++ b/app/MindWork AI Studio/AIOperations/AIOperationsJson.cs @@ -0,0 +1,21 @@ +using System.Text.Json; + +namespace AIStudio.AIOperations; + +/// +/// How AI operations read the JSON in the answers of models. +/// +/// +/// Find the JSON in an answer with ModelAnswerJson first, then read it with these options. +/// +internal static class AIOperationsJson +{ + /// + /// The options for the JSON in a model answer to an AI operation. + /// + internal static readonly JsonSerializerOptions OPTIONS = new JsonSerializerOptions + { + PropertyNamingPolicy = JsonNamingPolicy.SnakeCaseLower, + TypeInfoResolver = AIOperationsJsonContext.Default, + }.AsReadOnly(); +} \ No newline at end of file diff --git a/app/MindWork AI Studio/AIOperations/AIOperationsJsonContext.cs b/app/MindWork AI Studio/AIOperations/AIOperationsJsonContext.cs new file mode 100644 index 000000000..fda51c412 --- /dev/null +++ b/app/MindWork AI Studio/AIOperations/AIOperationsJsonContext.cs @@ -0,0 +1,16 @@ +using System.Text.Json.Serialization; + +using AIStudio.AIOperations.DataSourceChoice; +using AIStudio.AIOperations.PluginAudit; +using AIStudio.AIOperations.RetrievalContextValidation; + +namespace AIStudio.AIOperations; + +/// +/// The contracts with which System.Text.Json reads the answers of models to AI operations, built at compile time. +/// +[JsonSourceGenerationOptions(GenerationMode = JsonSourceGenerationMode.Metadata)] +[JsonSerializable(typeof(List))] +[JsonSerializable(typeof(RetrievalContextValidationResult))] +[JsonSerializable(typeof(PluginAuditResult))] +internal sealed partial class AIOperationsJsonContext : JsonSerializerContext; \ No newline at end of file diff --git a/app/MindWork AI Studio/AIOperations/CLAUDE.md b/app/MindWork AI Studio/AIOperations/CLAUDE.md new file mode 100644 index 000000000..eef4bd20c --- /dev/null +++ b/app/MindWork AI Studio/AIOperations/CLAUDE.md @@ -0,0 +1 @@ +@AGENTS.md \ No newline at end of file diff --git a/app/MindWork AI Studio/AIOperations/DataSourceChoice/DataSourceChoiceOperation.cs b/app/MindWork AI Studio/AIOperations/DataSourceChoice/DataSourceChoiceOperation.cs new file mode 100644 index 000000000..ab3594179 --- /dev/null +++ b/app/MindWork AI Studio/AIOperations/DataSourceChoice/DataSourceChoiceOperation.cs @@ -0,0 +1,198 @@ +using System.Text; +using System.Text.Json; + +using AIStudio.Chat; +using AIStudio.Provider; +using AIStudio.Settings; +using AIStudio.Settings.DataModel; +using AIStudio.Tools.Services; + +namespace AIStudio.AIOperations.DataSourceChoice; + +/// +/// Chooses the data sources which fit a prompt, from the descriptions of the data sources. +/// +/// +/// The classic RAG process runs it before it searches, see AgenticSrcSelWithDynHeur. +/// +public sealed class DataSourceChoiceOperation(ILogger logger, SettingsManager settingsManager, DataSourceDescriptionService descriptionService) : AIOperationBase(logger, settingsManager) +{ + private const string JOB_DESCRIPTION = + """ + You receive a system and a user prompt, as well as a list of possible data sources as input. + Your task is to select the appropriate data sources for the given task. You may choose none, + one, or multiple sources, depending on what best fits the system and user prompt. You need + to estimate and assess which source, based on its description, might be helpful in + processing the prompts. + + Your response is a JSON list in the following format: + + ``` + [ + {"id": "The data source ID", "reason": "Why did you choose this source?", "confidence": 0.87}, + {"id": "The data source ID", "reason": "Why did you choose this source?", "confidence": 0.54} + ] + ``` + + You express your confidence as a floating-point number between 0.0 (maximum uncertainty) and + 1.0 (you are absolutely certain that this source is needed). + + The JSON schema is: + + ``` + { + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "confidence": { + "type": "number" + } + }, + "required": [ + "id", + "reason", + "confidence" + ] + } + ] + } + ``` + + When no data source is needed, you return an empty JSON list `[]`. You do not ask any + follow-up questions. You do not address the user. Your response consists solely of + the JSON list. + """; + + /// + /// Reads the provider settings of the operation. + /// + /// The settings to read. + /// The preferred provider and the minimum confidence, or none of them while the preselection is switched off. + public static AIOperationProviderSettings GetProviderSettings(SettingsManager settingsManager) + { + var settings = settingsManager.ConfigurationData.AgentDataSourceSelection; + return settings.PreselectAgentOptions + ? new(settings.PreselectedAgentProvider, settings.MinimumProviderConfidence) + : AIOperationProviderSettings.NONE; + } + + #region Overrides of AIOperationBase + + /// + public override string Id => "Data Source Selection"; + + /// + public override Tools.Components Component => Tools.Components.AGENT_DATA_SOURCE_SELECTION; + + /// + /// The model reads the descriptions of the data sources, so it has to reach what they require. + /// + public override ConfidenceLevel GetRequiredConfidence(DataSourceChoiceRequest request) => request.DataSources.GetRequiredConfidenceLevel(); + + /// + public override async Task RunAsync(DataSourceChoiceRequest request, AIOperationContext context, CancellationToken token = default) + { + this.Logger.LogInformation("The AI should select the appropriate data sources."); + + // + // 1. Prepare the last prompt of the user as input: + // + var lastPromptContent = request.LastUserPrompt switch + { + ContentText text => text.Text, + + // Image prompts may be empty, e.g., when the image is too large: + ContentImage image => await image.TryAsBase64(token) is (success: true, { } base64Image) + ? base64Image + : string.Empty, + + // Other content types are not supported yet: + _ => string.Empty, + }; + + if (string.IsNullOrWhiteSpace(lastPromptContent)) + { + this.Logger.LogWarning("The last prompt is empty. The AI cannot select data sources."); + return DataSourceChoiceResult.NOT_ANSWERED; + } + + // + // 2. Prepare the data sources to choose from: + // + var availableDataSources = new StringBuilder(); + availableDataSources.AppendLineLF("The following data sources are available for selection:"); + foreach (var dataSource in request.DataSources) + { + var description = await descriptionService.GetDescriptionAsync(dataSource, token); + var descriptionPart = string.IsNullOrWhiteSpace(description) ? string.Empty : $", description='{description}'"; + switch (dataSource) + { + case DataSourceLocalDirectory localDirectory: + availableDataSources.AppendLineLF($"- Id={dataSource.Id}, name='{localDirectory.Name}', type=local directory, path='{localDirectory.Path}'{descriptionPart}"); + break; + + case DataSourceLocalFile localFile: + availableDataSources.AppendLineLF($"- Id={dataSource.Id}, name='{localFile.Name}', type=local file, path='{localFile.FilePath}'{descriptionPart}"); + break; + + case IERIDataSource eriDataSource: + availableDataSources.AppendLineLF($"- Id={dataSource.Id}, name='{eriDataSource.Name}', type=external data source{descriptionPart}"); + break; + } + } + + var systemPrompt = $""" + {JOB_DESCRIPTION} + + {availableDataSources} + """; + + var userPrompt = $""" + The system prompt is: + + ``` + {request.SystemPrompt} + ``` + + The user prompt is: + + ``` + {lastPromptContent} + ``` + """; + + // + // 3. Let the model choose: + // + var answer = await this.AskAsync(request, context, systemPrompt, userPrompt, token); + if (answer is null) + return DataSourceChoiceResult.NOT_ANSWERED; + + // + // 4. Read the answer. We know how bad models may be at writing JSON without surrounding text, + // so we expect the worst and extract the JSON list from the text: + // + var json = ModelAnswerJson.ExtractObjectList(answer); + try + { + var selectedDataSources = JsonSerializer.Deserialize>(json, AIOperationsJson.OPTIONS); + return new DataSourceChoiceResult(selectedDataSources ?? [], true); + } + catch + { + this.Logger.LogWarning("The AI answered with an invalid or unexpected JSON format."); + return DataSourceChoiceResult.NOT_ANSWERED; + } + } + + #endregion +} \ No newline at end of file diff --git a/app/MindWork AI Studio/AIOperations/DataSourceChoice/DataSourceChoiceRequest.cs b/app/MindWork AI Studio/AIOperations/DataSourceChoice/DataSourceChoiceRequest.cs new file mode 100644 index 000000000..49f85dbee --- /dev/null +++ b/app/MindWork AI Studio/AIOperations/DataSourceChoice/DataSourceChoiceRequest.cs @@ -0,0 +1,12 @@ +using AIStudio.Chat; +using AIStudio.Settings; + +namespace AIStudio.AIOperations.DataSourceChoice; + +/// +/// A prompt for which a model chooses the data sources to search. +/// +/// The system prompt of the chat. +/// The last prompt of the user. +/// The data sources to choose from, which the chat may use. +public sealed record DataSourceChoiceRequest(string SystemPrompt, IContent LastUserPrompt, IReadOnlyList DataSources); \ No newline at end of file diff --git a/app/MindWork AI Studio/AIOperations/DataSourceChoice/DataSourceChoiceResult.cs b/app/MindWork AI Studio/AIOperations/DataSourceChoice/DataSourceChoiceResult.cs new file mode 100644 index 000000000..7c0b7e178 --- /dev/null +++ b/app/MindWork AI Studio/AIOperations/DataSourceChoice/DataSourceChoiceResult.cs @@ -0,0 +1,14 @@ +namespace AIStudio.AIOperations.DataSourceChoice; + +/// +/// The data sources a model chose for a prompt. +/// +/// The chosen data sources, as the model named them; empty when it chose none. +/// Whether the model gave a usable answer. Without one, nothing was chosen either. +public sealed record DataSourceChoiceResult(IReadOnlyList SelectedDataSources, bool IsAnswered) +{ + /// + /// No usable answer: no provider, an empty prompt, or an answer without valid JSON. + /// + public static readonly DataSourceChoiceResult NOT_ANSWERED = new([], false); +} \ No newline at end of file diff --git a/app/MindWork AI Studio/Agents/SelectedDataSource.cs b/app/MindWork AI Studio/AIOperations/DataSourceChoice/SelectedDataSource.cs similarity index 52% rename from app/MindWork AI Studio/Agents/SelectedDataSource.cs rename to app/MindWork AI Studio/AIOperations/DataSourceChoice/SelectedDataSource.cs index ca2c2a9f4..e1db6e3b0 100644 --- a/app/MindWork AI Studio/Agents/SelectedDataSource.cs +++ b/app/MindWork AI Studio/AIOperations/DataSourceChoice/SelectedDataSource.cs @@ -1,9 +1,9 @@ -namespace AIStudio.Agents; +namespace AIStudio.AIOperations.DataSourceChoice; /// -/// Represents a selected data source, chosen by the agent. +/// Represents a selected data source, chosen by the model. /// /// The data source ID. /// The reason for selecting the data source. -/// The confidence of the agent in the selection. +/// The confidence of the model in the selection. public readonly record struct SelectedDataSource(string Id, string Reason, float Confidence) : IConfidence; \ No newline at end of file diff --git a/app/MindWork AI Studio/AIOperations/IAIOperation.cs b/app/MindWork AI Studio/AIOperations/IAIOperation.cs new file mode 100644 index 000000000..6cccda24b --- /dev/null +++ b/app/MindWork AI Studio/AIOperations/IAIOperation.cs @@ -0,0 +1,58 @@ +using AIStudio.Provider; + +namespace AIStudio.AIOperations; + +/// +/// A task which AI Studio hands to a model on its own: one request in, one result out, without a loop. +/// +/// +/// +/// An operation is registered as a singleton and keeps no state between calls, so several callers may run +/// it at the same time, e.g., two chats with RAG. Everything a call needs travels with it: the request, and +/// in the AIOperationContext the provider which the caller chose for it. +/// +/// +/// Each operation also declares a static method GetProviderSettings(SettingsManager), which reads the +/// provider settings of the operation fresh on every call. It is static, so that a service can learn which +/// provider would run without an instance of the operation. AIOperationProviderResolver chooses the +/// provider from these settings; see the AGENTS.md of this folder. +/// +/// +/// What the operation works on. +/// What the operation returns. +public interface IAIOperation +{ + /// + /// The name of the operation in the log, in English. + /// + public string Id { get; } + + /// + /// The component the operation runs as. + /// + /// + /// Its requests name it, e.g., in the User-Agent for self-hosted servers. Without it, an operation + /// working for an assistant would be counted as chat. + /// + public Tools.Components Component { get; } + + /// + /// The confidence level which the content of the request requires of a provider. + /// + /// + /// It comes from the request alone, e.g., from the data sources it carries or from the confidence a + /// chat requires. The minimum confidence of the operation itself is a setting and not part of it. + /// + /// The request to run. + /// The confidence level the content requires, NONE when it requires nothing. + public ConfidenceLevel GetRequiredConfidence(TRequest request); + + /// + /// Runs the operation for one request. + /// + /// The request to run. + /// What the call runs with, the provider above all. + /// The cancellation token. + /// The result of the operation. + public Task RunAsync(TRequest request, AIOperationContext context, CancellationToken token = default); +} \ No newline at end of file diff --git a/app/MindWork AI Studio/Agents/AssistantAudit/AssistantAuditFinding.cs b/app/MindWork AI Studio/AIOperations/PluginAudit/PluginAuditFinding.cs similarity index 61% rename from app/MindWork AI Studio/Agents/AssistantAudit/AssistantAuditFinding.cs rename to app/MindWork AI Studio/AIOperations/PluginAudit/PluginAuditFinding.cs index 0fe05d4fa..876662508 100644 --- a/app/MindWork AI Studio/Agents/AssistantAudit/AssistantAuditFinding.cs +++ b/app/MindWork AI Studio/AIOperations/PluginAudit/PluginAuditFinding.cs @@ -1,11 +1,11 @@ using System.Text.Json.Serialization; -namespace AIStudio.Agents.AssistantAudit; +namespace AIStudio.AIOperations.PluginAudit; /// -/// Represents a single structured security finding produced by the assistant audit agent. +/// Represents a single structured security finding produced by the security audit of a plugin. /// -public sealed class AssistantAuditFinding +public sealed class PluginAuditFinding { #pragma warning disable MWAIS0005 /// @@ -13,7 +13,7 @@ public sealed class AssistantAuditFinding /// #pragma warning restore MWAIS0005 [JsonIgnore] - public AssistantAuditLevel Severity { get; private set; } = AssistantAuditLevel.UNKNOWN; + public PluginAuditLevel Severity { get; private set; } = PluginAuditLevel.UNKNOWN; /// @@ -24,22 +24,22 @@ public sealed class AssistantAuditFinding { get => this.Severity switch { - AssistantAuditLevel.DANGEROUS => "critical", - AssistantAuditLevel.CAUTION => "medium", - AssistantAuditLevel.SAFE => "low", + PluginAuditLevel.DANGEROUS => "critical", + PluginAuditLevel.CAUTION => "medium", + PluginAuditLevel.SAFE => "low", _ => "unknown", }; set => this.Severity = value.Trim().ToLowerInvariant() switch { - "critical" => AssistantAuditLevel.DANGEROUS, - "medium" => AssistantAuditLevel.CAUTION, - "low" => AssistantAuditLevel.SAFE, - _ => AssistantAuditLevel.UNKNOWN, + "critical" => PluginAuditLevel.DANGEROUS, + "medium" => PluginAuditLevel.CAUTION, + "low" => PluginAuditLevel.SAFE, + _ => PluginAuditLevel.UNKNOWN, }; } public string Category { get; set; } = string.Empty; public string Location { get; set; } = string.Empty; public string Description { get; set; } = string.Empty; -} +} \ No newline at end of file diff --git a/app/MindWork AI Studio/Agents/AssistantAudit/AssistantAuditLevel.cs b/app/MindWork AI Studio/AIOperations/PluginAudit/PluginAuditLevel.cs similarity index 71% rename from app/MindWork AI Studio/Agents/AssistantAudit/AssistantAuditLevel.cs rename to app/MindWork AI Studio/AIOperations/PluginAudit/PluginAuditLevel.cs index 4a82f98d2..42fbacc9c 100644 --- a/app/MindWork AI Studio/Agents/AssistantAudit/AssistantAuditLevel.cs +++ b/app/MindWork AI Studio/AIOperations/PluginAudit/PluginAuditLevel.cs @@ -1,12 +1,12 @@ -namespace AIStudio.Agents.AssistantAudit; +namespace AIStudio.AIOperations.PluginAudit; /// /// Defines the normalized outcome levels used for assistant plugin security audits. /// -public enum AssistantAuditLevel +public enum PluginAuditLevel { UNKNOWN = 0, DANGEROUS = 100, CAUTION = 200, SAFE = 300, -} +} \ No newline at end of file diff --git a/app/MindWork AI Studio/AIOperations/PluginAudit/PluginAuditLevelExtensions.cs b/app/MindWork AI Studio/AIOperations/PluginAudit/PluginAuditLevelExtensions.cs new file mode 100644 index 000000000..50ef55c4a --- /dev/null +++ b/app/MindWork AI Studio/AIOperations/PluginAudit/PluginAuditLevelExtensions.cs @@ -0,0 +1,50 @@ +using AIStudio.Tools.PluginSystem; + +namespace AIStudio.AIOperations.PluginAudit; + +public static class PluginAuditLevelExtensions +{ + private static string TB(string fallbackEN) => I18N.I.T(fallbackEN, typeof(PluginAuditLevelExtensions).Namespace, nameof(PluginAuditLevelExtensions)); + + extension(PluginAuditLevel level) + { + public string Name => level switch + { + PluginAuditLevel.DANGEROUS => TB("Dangerous"), + PluginAuditLevel.CAUTION => TB("Concerning"), + PluginAuditLevel.SAFE => TB("Safe"), + _ => TB("Unknown"), + }; + + public Severity Severity => level switch + { + PluginAuditLevel.DANGEROUS => Severity.Error, + PluginAuditLevel.CAUTION => Severity.Warning, + PluginAuditLevel.SAFE => Severity.Success, + _ => Severity.Info, + }; + + public Color Color => level switch + { + PluginAuditLevel.DANGEROUS => Color.Error, + PluginAuditLevel.CAUTION => Color.Warning, + PluginAuditLevel.SAFE => Color.Success, + _ => Color.Default, + }; + + public string Icon => level switch + { + PluginAuditLevel.DANGEROUS => AppIcons.SECURITY_DANGEROUS, + PluginAuditLevel.CAUTION => AppIcons.WARNING, + PluginAuditLevel.SAFE => AppIcons.AUDIT_SAFE, + _ => AppIcons.UNKNOWN, + }; + + /// + /// Parses an audit level string and falls back to when parsing fails. + /// + /// The audit level text to parse. + /// The parsed audit level, or for null, empty, or invalid values. + public static PluginAuditLevel ParseOrUnknown(string? value) => Enum.TryParse(value, true, out var parsedLevel) ? parsedLevel : PluginAuditLevel.UNKNOWN; + } +} \ No newline at end of file diff --git a/app/MindWork AI Studio/Agents/AssistantAudit/AssistantAuditAgent.cs b/app/MindWork AI Studio/AIOperations/PluginAudit/PluginAuditOperation.cs similarity index 67% rename from app/MindWork AI Studio/Agents/AssistantAudit/AssistantAuditAgent.cs rename to app/MindWork AI Studio/AIOperations/PluginAudit/PluginAuditOperation.cs index 9385cee99..b29d49935 100644 --- a/app/MindWork AI Studio/Agents/AssistantAudit/AssistantAuditAgent.cs +++ b/app/MindWork AI Studio/AIOperations/PluginAudit/PluginAuditOperation.cs @@ -1,33 +1,26 @@ using System.Text; using System.Text.Json; + using AIStudio.Assistants; -using AIStudio.Chat; using AIStudio.Provider; using AIStudio.Settings; using AIStudio.Tools.PluginSystem; using AIStudio.Tools.PluginSystem.Assistants; -using AIStudio.Tools.Services; using AIStudio.Tools.ToolCallingSystem; -namespace AIStudio.Agents.AssistantAudit; +namespace AIStudio.AIOperations.PluginAudit; /// -/// Audits dynamic assistant plugins by sending their prompts, component structure, and Lua manifest -/// to a configured LLM and normalizing the response into a structured audit result. +/// Audits an assistant plugin by sending its prompts, component structure, and Lua manifest to a model and +/// normalizing the answer into a structured audit result. /// -public sealed class AssistantAuditAgent(ILogger logger, ILogger baseLogger, SettingsManager settingsManager, DataSourceService dataSourceService, ToolRegistry toolRegistry, ThreadSafeRandom rng) : AgentBase(baseLogger, settingsManager, dataSourceService, rng) +public sealed class PluginAuditOperation(ILogger logger, SettingsManager settingsManager, ToolRegistry toolRegistry) : AIOperationBase(logger, settingsManager) { - private static string TB(string fallbackEN) => I18N.I.T(fallbackEN, typeof(AssistantAuditAgent).Namespace, nameof(AssistantAuditAgent)); + private static string TB(string fallbackEN) => I18N.I.T(fallbackEN, typeof(PluginAuditOperation).Namespace, nameof(PluginAuditOperation)); - private static string TA(string fallbackEN) => I18N.I.TA(fallbackEN, typeof(AssistantAuditAgent).Namespace, nameof(AssistantAuditAgent)); - - protected override Type Type => Type.SYSTEM; + private static string TA(string fallbackEN) => I18N.I.TA(fallbackEN, typeof(PluginAuditOperation).Namespace, nameof(PluginAuditOperation)); - protected override Tools.Components Component => Tools.Components.AGENT_ASSISTANT_PLUGIN_AUDIT; - - public override string Id => "Assistant Plugin Security Audit"; - - protected override string JobDescription => + private const string JOB_DESCRIPTION = """ You are a conservative security auditor for Lua-based assistant plugins in private and enterprise environments. The Lua code is parsed into functional assistants that help users with tasks like coding, emails, translations, and other workflows defined by plugin developers. @@ -101,90 +94,38 @@ public sealed class AssistantAuditAgent(ILogger logger, ILo and do not limit yourself to literal phrase matching. """; - protected override string SystemPrompt(string additionalData) => string.IsNullOrWhiteSpace(additionalData) - ? this.JobDescription - : $"{this.JobDescription}\n\n{additionalData}"; - - public override AIStudio.Settings.Provider ProviderSettings { get; set; } = AIStudio.Settings.Provider.NONE; - - public override Task ProcessContext(ChatThread chatThread, IDictionary additionalData) => Task.FromResult(chatThread); - - public override async Task ProcessInput(ContentBlock input, IDictionary additionalData) - { - if (input.Content is not ContentText text || string.IsNullOrWhiteSpace(text.Text) || text.InitialRemoteWait || text.IsStreaming) - return EMPTY_BLOCK; - - var thread = this.CreateChatThread(this.SystemPrompt(string.Empty)); - var userRequest = AddUserRequest(thread, text.Text); - await this.AddAIResponseAsync(thread, userRequest.UserPrompt, userRequest.Time); - return thread.Blocks[^1]; - } - - public override Task MadeDecision(ContentBlock input) => Task.FromResult(true); - - public override IReadOnlyCollection GetContext() => []; - - public override IReadOnlyCollection GetAnswers() => []; - /// - /// Resolves and stores the provider configuration used for assistant plugin audits. + /// Reads the provider settings of the operation. /// - /// The provider to use when no provider is configured for the audit agent. - /// The configured provider, or Provider.NONE when no audit provider is configured. /// - /// A fallback is a provider somebody picked for something else: the assistant they were building, - /// the revision they asked for, the check they are standing in front of. Whether it may read a - /// plugin's source and its Lua files is decided by what this agent requires, not by what it was - /// picked under, so it has to clear this agent's confidence bar before it is used. Otherwise a - /// provider an organization ruled out for audits would see the very thing it was ruled out for. + /// Unlike the other operations, the audit has no switch for its preselection: an organization rolls its + /// provider out, and that is what audits run with. /// - public AIStudio.Settings.Provider ResolveProvider(AIStudio.Settings.Provider? fallbackProvider = null) + /// The settings to read. + /// The preferred provider and the minimum confidence. + public static AIOperationProviderSettings GetProviderSettings(SettingsManager settingsManager) { - var provider = this.SettingsManager.GetPreselectedProvider(Tools.Components.AGENT_ASSISTANT_PLUGIN_AUDIT, null, true); - if (provider == AIStudio.Settings.Provider.NONE && fallbackProvider is { } candidate && this.SettingsManager.IsProviderConfident(candidate, Tools.Components.AGENT_ASSISTANT_PLUGIN_AUDIT)) - provider = candidate; - - this.ProviderSettings = provider; - return provider; + var settings = settingsManager.ConfigurationData.AssistantPluginAudit; + return new(settings.PreselectedAgentProvider, settings.MinimumProviderConfidence); } + #region Overrides of AIOperationBase + + /// + public override string Id => "Assistant Plugin Security Audit"; + + /// + public override Tools.Components Component => Tools.Components.AGENT_ASSISTANT_PLUGIN_AUDIT; + /// - /// Runs a security audit for the specified assistant plugin and parses the LLM response into a structured result. + /// A plugin requires nothing of its own: whoever may audit it is decided by the minimum of the audit. /// - /// The assistant plugin to audit. - /// The provider to use when no provider is configured for the audit agent. - /// A cancellation token for prompt generation and the audit request. - /// - /// The parsed audit result, or an UNKNOWN result when no provider is configured or the model response cannot be used. - /// - public async Task AuditAsync(PluginAssistants plugin, Settings.Provider? fallbackProvider = null, CancellationToken token = default) + public override ConfidenceLevel GetRequiredConfidence(PluginAuditRequest request) => ConfidenceLevel.NONE; + + /// + public override async Task RunAsync(PluginAuditRequest request, AIOperationContext context, CancellationToken token = default) { - var provider = this.ResolveProvider(fallbackProvider); - if (provider == AIStudio.Settings.Provider.NONE) - { - // - // There are two ways to end up here, and they send the user to different places: nobody - // named a provider, or the one at hand is not trusted enough for an audit. Saying that - // none is configured while one sits right there would send them looking in vain. - // - var wasFallbackRejected = fallbackProvider is { UsedLLMProvider: not LLMProviders.NONE }; - var message = wasFallbackRejected - ? TA("The selected provider is not trusted enough for security checks. Pick one which meets the confidence required here, or choose a dedicated provider for security checks in the app settings.") - : TB("No provider is configured for the Security Audit Agent."); - - await MessageBus.INSTANCE.SendError(new (AppIcons.AGENT, message)); - - return new AssistantAuditResult - { - Level = nameof(AssistantAuditLevel.UNKNOWN), - Summary = wasFallbackRejected - ? TB("The provider is not trusted enough for security checks.") - : TB("No audit provider is configured."), - }; - } - - logger.LogInformation($"The assistant plugin audit agent uses the provider '{provider.InstanceName}' ({provider.UsedLLMProvider.Name}, confidence={provider.UsedLLMProvider.GetConfidence(this.SettingsManager).Level.Name})."); - + var plugin = request.Plugin; var promptPreview = await plugin.BuildAuditPromptPreviewAsync(token); var promptFallbackPreview = plugin.BuildAuditPromptFallbackPreview(); var luaManifest = FormatLuaManifest(plugin.ReadAllLuaFiles()); @@ -258,64 +199,56 @@ public sealed class AssistantAuditAgent(ILogger logger, ILo ``` """; - var response = await this.ProcessInput(new ContentBlock + var answer = await this.AskAsync(request, context, JOB_DESCRIPTION, userPrompt, token); + if (answer is null) { - Time = DateTimeOffset.UtcNow, - ContentType = ContentType.TEXT, - Role = ChatRole.USER, - Content = new ContentText - { - Text = userPrompt, - }, - }, new Dictionary()); + this.Logger.LogWarning("The AI operation for the plugin audit got no usable answer."); + await MessageBus.INSTANCE.SendWarning(new (AppIcons.AUDIT_INCOMPLETE, TA("The security check could not be completed because the LLM's response was unusable. The audit level remains Unknown, so please try again later."))); - if (response.Content is not ContentText content || string.IsNullOrWhiteSpace(content.Text)) - { - logger.LogWarning($"The assistant plugin audit agent did not return text: {response}"); - await MessageBus.INSTANCE.SendWarning(new (AppIcons.AUDIT_INCOMPLETE, string.Format(TA("The security check could not be completed because the LLM's response was unusable. The audit level remains Unknown, so please try again later.")))); - - return new AssistantAuditResult + return new PluginAuditResult { - Level = nameof(AssistantAuditLevel.UNKNOWN), - Summary = TB("The audit agent did not return a usable response."), + Level = nameof(PluginAuditLevel.UNKNOWN), + Summary = TB("The audit did not return a usable response."), }; } - var json = ModelAnswerJson.ExtractObject(content.Text); + var json = ModelAnswerJson.ExtractObject(answer); try { - var result = JsonSerializer.Deserialize(json, JSON_SERIALIZER_OPTIONS); + var result = JsonSerializer.Deserialize(json, AIOperationsJson.OPTIONS); return result is null - ? new AssistantAuditResult + ? new PluginAuditResult { - Level = nameof(AssistantAuditLevel.UNKNOWN), + Level = nameof(PluginAuditLevel.UNKNOWN), Summary = TB("The audit result was empty."), } : NormalizeResult(result); } catch { - logger.LogWarning($"The assistant plugin audit agent returned invalid JSON: {json}"); - return new AssistantAuditResult + this.Logger.LogWarning($"The AI operation for the plugin audit got invalid JSON: {json}"); + return new PluginAuditResult { - Level = nameof(AssistantAuditLevel.UNKNOWN), - Summary = TB("The audit agent returned invalid JSON."), + Level = nameof(PluginAuditLevel.UNKNOWN), + Summary = TB("The audit returned invalid JSON."), }; } } + #endregion + /// /// Normalizes the model output so deterministic policy rules can correct inconsistent level assignments. /// - private static AssistantAuditResult NormalizeResult(AssistantAuditResult result) + private static PluginAuditResult NormalizeResult(PluginAuditResult result) { var normalizedFindings = result.Findings; - var parsedLevel = AssistantAuditLevel.ParseOrUnknown(result.Level); + var parsedLevel = PluginAuditLevel.ParseOrUnknown(result.Level); var lowestFindingLevel = GetMostSevereFindingLevel(normalizedFindings); - if (lowestFindingLevel != AssistantAuditLevel.UNKNOWN && (parsedLevel == AssistantAuditLevel.UNKNOWN || lowestFindingLevel < parsedLevel)) + if (lowestFindingLevel != PluginAuditLevel.UNKNOWN && (parsedLevel == PluginAuditLevel.UNKNOWN || lowestFindingLevel < parsedLevel)) parsedLevel = lowestFindingLevel; - return new AssistantAuditResult + return new PluginAuditResult { Level = parsedLevel.ToString(), Summary = result.Summary, @@ -383,19 +316,19 @@ public sealed class AssistantAuditAgent(ILogger logger, ILo /// /// Returns the most severe finding level contained in the result, where DANGEROUS is more severe than CAUTION and SAFE. /// - private static AssistantAuditLevel GetMostSevereFindingLevel(IEnumerable findings) + private static PluginAuditLevel GetMostSevereFindingLevel(IEnumerable findings) { - var mostSevere = AssistantAuditLevel.UNKNOWN; + var mostSevere = PluginAuditLevel.UNKNOWN; foreach (var finding in findings) { - if (finding.Severity == AssistantAuditLevel.UNKNOWN) + if (finding.Severity == PluginAuditLevel.UNKNOWN) continue; - if (mostSevere == AssistantAuditLevel.UNKNOWN || finding.Severity < mostSevere) + if (mostSevere == PluginAuditLevel.UNKNOWN || finding.Severity < mostSevere) mostSevere = finding.Severity; } return mostSevere; } -} +} \ No newline at end of file diff --git a/app/MindWork AI Studio/AIOperations/PluginAudit/PluginAuditRequest.cs b/app/MindWork AI Studio/AIOperations/PluginAudit/PluginAuditRequest.cs new file mode 100644 index 000000000..f8f9058c1 --- /dev/null +++ b/app/MindWork AI Studio/AIOperations/PluginAudit/PluginAuditRequest.cs @@ -0,0 +1,9 @@ +using AIStudio.Tools.PluginSystem.Assistants; + +namespace AIStudio.AIOperations.PluginAudit; + +/// +/// A plugin to audit for security risks. +/// +/// The assistant plugin to audit. +public sealed record PluginAuditRequest(PluginAssistants Plugin); \ No newline at end of file diff --git a/app/MindWork AI Studio/Agents/AssistantAudit/AssistantAuditResult.cs b/app/MindWork AI Studio/AIOperations/PluginAudit/PluginAuditResult.cs similarity index 63% rename from app/MindWork AI Studio/Agents/AssistantAudit/AssistantAuditResult.cs rename to app/MindWork AI Studio/AIOperations/PluginAudit/PluginAuditResult.cs index 78593bfb5..9795119e2 100644 --- a/app/MindWork AI Studio/Agents/AssistantAudit/AssistantAuditResult.cs +++ b/app/MindWork AI Studio/AIOperations/PluginAudit/PluginAuditResult.cs @@ -1,15 +1,15 @@ -namespace AIStudio.Agents.AssistantAudit; +namespace AIStudio.AIOperations.PluginAudit; /// /// Represents the normalized result returned by the assistant plugin security audit flow. /// -public sealed record AssistantAuditResult +public sealed record PluginAuditResult { /// - /// Gets the serialized audit level returned by the model before callers normalize it to . + /// Gets the serialized audit level returned by the model before callers normalize it to . /// public string Level { get; set; } = string.Empty; public string Summary { get; set; } = string.Empty; public float Confidence { get; set; } - public List Findings { get; set; } = []; -} + public List Findings { get; set; } = []; +} \ No newline at end of file diff --git a/app/MindWork AI Studio/AIOperations/RetrievalContextValidation/RetrievalContextValidationOperation.cs b/app/MindWork AI Studio/AIOperations/RetrievalContextValidation/RetrievalContextValidationOperation.cs new file mode 100644 index 000000000..f12549118 --- /dev/null +++ b/app/MindWork AI Studio/AIOperations/RetrievalContextValidation/RetrievalContextValidationOperation.cs @@ -0,0 +1,226 @@ +using System.Text.Json; + +using AIStudio.Chat; +using AIStudio.Provider; +using AIStudio.Settings; +using AIStudio.Tools.RAG; + +namespace AIStudio.AIOperations.RetrievalContextValidation; + +/// +/// Judges for each passage found by the classic RAG process whether it helps with the prompt. +/// +/// +/// It asks one request per passage, several at once, as many as NumParallelValidations allows. The limit +/// holds per call: two chats validating at the same time each get their own. +/// +public sealed class RetrievalContextValidationOperation(ILogger logger, SettingsManager settingsManager) : AIOperationBase>(logger, settingsManager) +{ + private const int DEFAULT_PARALLEL_VALIDATIONS = 3; + + private const string JOB_DESCRIPTION = + """ + You receive a system and user prompt as well as a retrieval context as input. Your task is to decide whether this + retrieval context is helpful in processing the prompts or not. You respond with the decision (true or false), + your reasoning, and your confidence in this decision. + + Your response is only one JSON object in the following format: + + ``` + {"decision": true, "reason": "Why did you choose this source?", "confidence": 0.87} + ``` + + You express your confidence as a floating-point number between 0.0 (maximum uncertainty) and + 1.0 (you are absolutely certain that this retrieval context is needed). + + The JSON schema is: + + ``` + { + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "decision": { + "type": "boolean" + }, + "reason": { + "type": "string" + }, + "confidence": { + "type": "number" + } + }, + "required": [ + "decision", + "reason", + "confidence" + ] + } + ``` + + You do not ask any follow-up questions. You do not address the user. Your response consists solely of + that one JSON object. + """; + + /// + /// Reads the provider settings of the operation. + /// + /// The settings to read. + /// The preferred provider and the minimum confidence, or none of them while the preselection is switched off. + public static AIOperationProviderSettings GetProviderSettings(SettingsManager settingsManager) + { + var settings = settingsManager.ConfigurationData.AgentRetrievalContextValidation; + return settings.PreselectAgentOptions + ? new(settings.PreselectedAgentProvider, settings.MinimumProviderConfidence) + : AIOperationProviderSettings.NONE; + } + + #region Overrides of AIOperationBase + + /// + public override string Id => "Retrieval Context Validation"; + + /// + public override Tools.Components Component => Tools.Components.AGENT_RETRIEVAL_CONTEXT_VALIDATION; + + /// + /// The model reads the passages, so it has to reach what the chat requires of every provider which reads its data. + /// + public override ConfidenceLevel GetRequiredConfidence(RetrievalContextValidationRequest request) => request.RequiredConfidence; + + /// + public override async Task> RunAsync(RetrievalContextValidationRequest request, AIOperationContext context, CancellationToken token = default) + { + this.Logger.LogInformation($"Validating {request.RetrievalContexts.Count:###,###,###,###} retrieval contexts."); + + // + // The last prompt of the user is the same for every passage, so it is prepared once: + // + var lastPromptContent = request.LastUserPrompt switch + { + ContentText text => text.Text, + + // Image prompts may be empty, e.g., when the image is too large: + ContentImage image => await image.TryAsBase64(token) is (success: true, { } base64Image) + ? base64Image + : string.Empty, + + // Other content types are not supported yet: + _ => string.Empty, + }; + + if (string.IsNullOrWhiteSpace(lastPromptContent)) + { + this.Logger.LogWarning("The last prompt is empty. The AI cannot validate the retrieval contexts."); + return request.RetrievalContexts.Select(retrievalContext => new RetrievalContextValidationResult(false, "The last prompt was empty.", 1.0f, retrievalContext)).ToList(); + } + + var settings = this.SettingsManager.ConfigurationData.AgentRetrievalContextValidation; + var numParallelValidations = settings.PreselectAgentOptions ? settings.NumParallelValidations : DEFAULT_PARALLEL_VALIDATIONS; + + // + // A semaphore of this call limits the validations running at once. It is local, so that + // another chat validating at the same time does not share the limit of this one: + // + using var semaphore = new SemaphoreSlim(Math.Max(1, numParallelValidations)); + var validationTasks = new List>(request.RetrievalContexts.Count); + try + { + foreach (var retrievalContext in request.RetrievalContexts) + { + await semaphore.WaitAsync(token); + validationTasks.Add(this.ValidateAsync(request, context, lastPromptContent, retrievalContext, semaphore, token)); + } + } + catch (OperationCanceledException) + { + // + // Each validation releases its slot when it ends, and the semaphore is disposed as soon + // as this method returns. The validations already running got the same token and stop + // soon; this call waits for them, so that none of them releases a disposed semaphore: + // + try + { + await Task.WhenAll(validationTasks); + } + catch (OperationCanceledException) + { + // Expected: they stop because of the same token. + } + catch (Exception exception) + { + this.Logger.LogWarning(exception, "A retrieval context validation failed while the validations were being canceled."); + } + + throw; + } + + return await Task.WhenAll(validationTasks); + } + + #endregion + + /// + /// Validates one passage and releases its slot of the semaphore afterward. + /// + private async Task ValidateAsync(RetrievalContextValidationRequest request, AIOperationContext context, string lastPromptContent, PreparedRetrievalContext retrievalContext, SemaphoreSlim semaphore, CancellationToken token) + { + try + { + // + // The validation may be canceled while it waits, e.g., by the user or because it took + // too long: + // + if (token.IsCancellationRequested) + return new(false, "The validation was canceled.", 1.0f, retrievalContext); + + // + // The model reads the passage exactly as the chat model would, filtered once for both, + // so the check judges what is actually sent: + // + var systemPrompt = $""" + {JOB_DESCRIPTION} + + {retrievalContext.ToMarkdown()} + """; + + var userPrompt = $""" + The system prompt is: + + ``` + {request.SystemPrompt} + ``` + + The user prompt is: + + ``` + {lastPromptContent} + ``` + """; + + var answer = await this.AskAsync(request, context, systemPrompt, userPrompt, token); + if (answer is null) + return new(false, "The AI did not return a response.", 1.0f, retrievalContext); + + // + // We know how bad models may be at writing JSON without surrounding text, so we expect + // the worst and extract the JSON object from the text: + // + var json = ModelAnswerJson.ExtractObject(answer); + try + { + var result = JsonSerializer.Deserialize(json, AIOperationsJson.OPTIONS); + return result with { RetrievalContext = retrievalContext }; + } + catch + { + this.Logger.LogWarning("The AI answered with an invalid or unexpected JSON format."); + return new(false, "The AI answered with an invalid or unexpected JSON format.", 1.0f, retrievalContext); + } + } + finally + { + semaphore.Release(); + } + } +} \ No newline at end of file diff --git a/app/MindWork AI Studio/AIOperations/RetrievalContextValidation/RetrievalContextValidationRequest.cs b/app/MindWork AI Studio/AIOperations/RetrievalContextValidation/RetrievalContextValidationRequest.cs new file mode 100644 index 000000000..1b0720e0a --- /dev/null +++ b/app/MindWork AI Studio/AIOperations/RetrievalContextValidation/RetrievalContextValidationRequest.cs @@ -0,0 +1,14 @@ +using AIStudio.Chat; +using AIStudio.Provider; +using AIStudio.Tools.RAG; + +namespace AIStudio.AIOperations.RetrievalContextValidation; + +/// +/// The passages found for a prompt, for a model to judge whether they help with it. +/// +/// The system prompt of the chat. +/// The last prompt of the user. +/// The passages to judge, prepared for the AI and thus already filtered for prompt injections. +/// The confidence level the chat requires of every provider which reads its data. +public sealed record RetrievalContextValidationRequest(string SystemPrompt, IContent LastUserPrompt, IReadOnlyList RetrievalContexts, ConfidenceLevel RequiredConfidence); \ No newline at end of file diff --git a/app/MindWork AI Studio/Agents/RetrievalContextValidationResult.cs b/app/MindWork AI Studio/AIOperations/RetrievalContextValidation/RetrievalContextValidationResult.cs similarity index 85% rename from app/MindWork AI Studio/Agents/RetrievalContextValidationResult.cs rename to app/MindWork AI Studio/AIOperations/RetrievalContextValidation/RetrievalContextValidationResult.cs index 66a33c3eb..25cf65ec0 100644 --- a/app/MindWork AI Studio/Agents/RetrievalContextValidationResult.cs +++ b/app/MindWork AI Studio/AIOperations/RetrievalContextValidation/RetrievalContextValidationResult.cs @@ -1,6 +1,6 @@ using AIStudio.Tools.RAG; -namespace AIStudio.Agents; +namespace AIStudio.AIOperations.RetrievalContextValidation; /// /// Represents the result of a retrieval context validation. diff --git a/app/MindWork AI Studio/AIOperations/TextContentCleaning/TextContentCleaningOperation.cs b/app/MindWork AI Studio/AIOperations/TextContentCleaning/TextContentCleaningOperation.cs new file mode 100644 index 000000000..e09d1083c --- /dev/null +++ b/app/MindWork AI Studio/AIOperations/TextContentCleaning/TextContentCleaningOperation.cs @@ -0,0 +1,65 @@ +using AIStudio.Provider; +using AIStudio.Settings; + +namespace AIStudio.AIOperations.TextContentCleaning; + +/// +/// Keeps the main content of a web page and removes the rest, such as navigation, advertisements, and cookie banners. +/// +public sealed class TextContentCleaningOperation(ILogger logger, SettingsManager settingsManager) : AIOperationBase(logger, settingsManager) +{ + private const string JOB_DESCRIPTION = + """ + You receive a Markdown document as input. Your goal is to identify the main content of the document + and return it including Markdown formatting. Remove areas that do not belong to the main part of the + document. For a blog article, return only the text of the article with its formatting. For a scientific + paper, only the contents of the paper. Delete elements of navigation, advertisements, HTML artifacts, + cookie banners, etc. If the content contains images, these images remain. The same applies to links. + Ensure that links and images are present as valid Markdown: + + - Syntax of links: [link text](URL) + - Syntax of images: ![alt text](URL) + + If you find relative links or images with relative paths, correct them to absolute paths. For this + purpose, here is the source URL: + """; + + /// + /// Reads the provider settings of the operation. + /// + /// The settings to read. + /// The preferred provider and the minimum confidence, or none of them while the preselection is switched off. + public static AIOperationProviderSettings GetProviderSettings(SettingsManager settingsManager) + { + var settings = settingsManager.ConfigurationData.TextContentCleaner; + return settings.PreselectAgentOptions + ? new(settings.PreselectedAgentProvider, settings.MinimumProviderConfidence) + : AIOperationProviderSettings.NONE; + } + + #region Overrides of AIOperationBase + + /// + public override string Id => "Text Content Cleaning"; + + /// + public override Tools.Components Component => Tools.Components.AGENT_TEXT_CONTENT_CLEANER; + + /// + /// A web page requires nothing of its own: the user chose to read it with the assistant. + /// + public override ConfidenceLevel GetRequiredConfidence(TextContentCleaningRequest request) => ConfidenceLevel.NONE; + + /// + public override async Task RunAsync(TextContentCleaningRequest request, AIOperationContext context, CancellationToken token = default) + { + var uncleaned = new TextContentCleaningResult(request.Markdown, false); + if (string.IsNullOrWhiteSpace(request.Markdown) || string.IsNullOrWhiteSpace(request.SourceUrl)) + return uncleaned; + + var answer = await this.AskAsync(request, context, $"{JOB_DESCRIPTION} `{request.SourceUrl}`.", request.Markdown, token); + return answer is null ? uncleaned : new TextContentCleaningResult(answer, true); + } + + #endregion +} \ No newline at end of file diff --git a/app/MindWork AI Studio/AIOperations/TextContentCleaning/TextContentCleaningRequest.cs b/app/MindWork AI Studio/AIOperations/TextContentCleaning/TextContentCleaningRequest.cs new file mode 100644 index 000000000..cdf0d2cdd --- /dev/null +++ b/app/MindWork AI Studio/AIOperations/TextContentCleaning/TextContentCleaningRequest.cs @@ -0,0 +1,8 @@ +namespace AIStudio.AIOperations.TextContentCleaning; + +/// +/// A web page to clean. +/// +/// The page as Markdown, already filtered for prompt injections. +/// The address of the page, for turning relative links into absolute ones. +public sealed record TextContentCleaningRequest(string Markdown, string SourceUrl); \ No newline at end of file diff --git a/app/MindWork AI Studio/AIOperations/TextContentCleaning/TextContentCleaningResult.cs b/app/MindWork AI Studio/AIOperations/TextContentCleaning/TextContentCleaningResult.cs new file mode 100644 index 000000000..8db958a17 --- /dev/null +++ b/app/MindWork AI Studio/AIOperations/TextContentCleaning/TextContentCleaningResult.cs @@ -0,0 +1,8 @@ +namespace AIStudio.AIOperations.TextContentCleaning; + +/// +/// The text of a web page after the cleaning. +/// +/// The cleaned page, or the page as it came when it could not be cleaned. +/// Whether a model cleaned the page. +public sealed record TextContentCleaningResult(string Markdown, bool IsCleaned); \ No newline at end of file diff --git a/app/MindWork AI Studio/Agents/AgentBase.cs b/app/MindWork AI Studio/Agents/AgentBase.cs deleted file mode 100644 index 1011ebd58..000000000 --- a/app/MindWork AI Studio/Agents/AgentBase.cs +++ /dev/null @@ -1,141 +0,0 @@ -using System.Text.Json; - -using AIStudio.Chat; -using AIStudio.Provider; -using AIStudio.Settings; -using AIStudio.Tools.Services; - -// ReSharper disable MemberCanBePrivate.Global - -namespace AIStudio.Agents; - -public abstract class AgentBase(ILogger logger, SettingsManager settingsManager, DataSourceService dataSourceService, ThreadSafeRandom rng) : IAgent -{ - protected static readonly ContentBlock EMPTY_BLOCK = new() - { - Content = null, - ContentType = ContentType.NONE, - Role = ChatRole.AGENT, - Time = DateTimeOffset.UtcNow, - }; - - internal static readonly JsonSerializerOptions JSON_SERIALIZER_OPTIONS = new JsonSerializerOptions - { - PropertyNamingPolicy = JsonNamingPolicy.SnakeCaseLower, - TypeInfoResolver = AgentJsonContext.Default, - }.AsReadOnly(); - - protected DataSourceService DataSourceService { get; init; } = dataSourceService; - - protected SettingsManager SettingsManager { get; init; } = settingsManager; - - protected ThreadSafeRandom RNG { get; init; } = rng; - - protected ILogger Logger { get; init; } = logger; - - /// - /// Represents the type or category of this agent. - /// - protected abstract Type Type { get; } - - /// - /// The component this agent runs as. - /// - /// - /// Its requests name it, e.g., in the User-Agent for self-hosted servers. Without it, an agent - /// working for an assistant would be counted as chat. - /// - protected abstract Tools.Components Component { get; } - - /// - /// The name of the agent. - /// - public abstract string Id { get; } - - /// - /// The agent's job description. Will be used for the system prompt. - /// - protected abstract string JobDescription { get; } - - /// - /// Represents the system prompt provided for the agent. - /// - protected abstract string SystemPrompt(string additionalData); - - #region Implementation of IAgent - - public abstract AIStudio.Settings.Provider ProviderSettings { get; set; } - - public abstract Task ProcessContext(ChatThread chatThread, IDictionary additionalData); - - public abstract Task ProcessInput(ContentBlock input, IDictionary additionalData); - - public abstract Task MadeDecision(ContentBlock input); - - public abstract IReadOnlyCollection GetContext(); - - public abstract IReadOnlyCollection GetAnswers(); - - #endregion - - protected ChatThread CreateChatThread(string systemPrompt) => new() - { - WorkspaceId = Guid.Empty, - ChatId = Guid.NewGuid(), - Name = string.Empty, - SystemPrompt = systemPrompt, - Blocks = [], - RuntimeComponent = this.Component, - }; - - protected static UserRequest AddUserRequest(ChatThread thread, string request) - { - var time = DateTimeOffset.Now; - var lastUserPrompt = new ContentText - { - Text = request, - }; - - thread.Blocks.Add(new ContentBlock - { - Time = time, - ContentType = ContentType.TEXT, - Role = ChatRole.USER, - Content = lastUserPrompt, - }); - - return new() - { - Time = time, - UserPrompt = lastUserPrompt, - }; - } - - protected async Task AddAIResponseAsync(ChatThread thread, IContent lastUserPrompt, DateTimeOffset time) - { - if(this.ProviderSettings == Settings.Provider.NONE) - return; - - var aiText = new ContentText - { - // We have to wait for the remote - // for the content stream: - InitialRemoteWait = true, - }; - - var resultingContentBlock = new ContentBlock - { - Time = time, - ContentType = ContentType.TEXT, - Role = ChatRole.AI, - Content = aiText, - }; - - thread.Blocks.Add(resultingContentBlock); - - // Use the selected provider to get the AI response. - // By awaiting this line, we wait for the entire - // content to be streamed. - await aiText.CreateFromProviderAsync(this.ProviderSettings.CreateProvider(), this.ProviderSettings.Model, lastUserPrompt, thread); - } -} \ No newline at end of file diff --git a/app/MindWork AI Studio/Agents/AgentDataSourceSelection.cs b/app/MindWork AI Studio/Agents/AgentDataSourceSelection.cs deleted file mode 100644 index c81078dac..000000000 --- a/app/MindWork AI Studio/Agents/AgentDataSourceSelection.cs +++ /dev/null @@ -1,296 +0,0 @@ -using System.Text; -using System.Text.Json; - -using AIStudio.Chat; -using AIStudio.Provider; -using AIStudio.Settings; -using AIStudio.Settings.DataModel; -using AIStudio.Tools.Services; - -namespace AIStudio.Agents; - -public sealed class AgentDataSourceSelection (ILogger logger, ILogger baseLogger, SettingsManager settingsManager, DataSourceService dataSourceService, DataSourceDescriptionService descriptionService, ThreadSafeRandom rng) : AgentBase(baseLogger, settingsManager, dataSourceService, rng) -{ - private readonly List answers = new(); - - #region Overrides of AgentBase - - /// - protected override Type Type => Type.SYSTEM; - - /// - protected override Tools.Components Component => Tools.Components.AGENT_DATA_SOURCE_SELECTION; - - /// - public override string Id => "Data Source Selection"; - - /// - protected override string JobDescription => - """ - You receive a system and a user prompt, as well as a list of possible data sources as input. - Your task is to select the appropriate data sources for the given task. You may choose none, - one, or multiple sources, depending on what best fits the system and user prompt. You need - to estimate and assess which source, based on its description, might be helpful in - processing the prompts. - - Your response is a JSON list in the following format: - - ``` - [ - {"id": "The data source ID", "reason": "Why did you choose this source?", "confidence": 0.87}, - {"id": "The data source ID", "reason": "Why did you choose this source?", "confidence": 0.54} - ] - ``` - - You express your confidence as a floating-point number between 0.0 (maximum uncertainty) and - 1.0 (you are absolutely certain that this source is needed). - - The JSON schema is: - - ``` - { - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "array", - "items": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "reason": { - "type": "string" - }, - "confidence": { - "type": "number" - } - }, - "required": [ - "id", - "reason", - "confidence" - ] - } - ] - } - ``` - - When no data source is needed, you return an empty JSON list `[]`. You do not ask any - follow-up questions. You do not address the user. Your response consists solely of - the JSON list. - """; - - /// - protected override string SystemPrompt(string availableDataSources) => $""" - {this.JobDescription} - - {availableDataSources} - """; - - /// - public override Settings.Provider ProviderSettings { get; set; } = Settings.Provider.NONE; - - /// - /// The data source selection agent does not work with context. Use - /// the process input method instead. - /// - /// The chat thread without any changes. - public override Task ProcessContext(ChatThread chatThread, IDictionary additionalData) => Task.FromResult(chatThread); - - /// - public override async Task ProcessInput(ContentBlock input, IDictionary additionalData) - { - if (input.Content is not ContentText text) - return EMPTY_BLOCK; - - if(text.InitialRemoteWait || text.IsStreaming) - return EMPTY_BLOCK; - - if(string.IsNullOrWhiteSpace(text.Text)) - return EMPTY_BLOCK; - - if(!additionalData.TryGetValue("availableDataSources", out var availableDataSources) || string.IsNullOrWhiteSpace(availableDataSources)) - return EMPTY_BLOCK; - - var thread = this.CreateChatThread(this.SystemPrompt(availableDataSources)); - var userRequest = AddUserRequest(thread, text.Text); - await this.AddAIResponseAsync(thread, userRequest.UserPrompt, userRequest.Time); - - var answer = thread.Blocks[^1]; - - this.answers.Add(answer); - return answer; - } - - // - public override Task MadeDecision(ContentBlock input) => Task.FromResult(true); - - // - public override IReadOnlyCollection GetContext() => []; - - // - public override IReadOnlyCollection GetAnswers() => this.answers; - - #endregion - - public async Task> PerformSelectionAsync(IProvider provider, IContent lastUserPrompt, ChatThread chatThread, AllowedSelectedDataSources dataSources, CancellationToken token = default) - { - logger.LogInformation("The AI should select the appropriate data sources."); - - // - // 1. Which LLM provider should the agent use? - // - - // We start with the provider currently selected by the user: - var requiredDataSecurity = dataSources.AllowedDataSources.GetRequiredSecurityPolicy(); - var requiredConfidenceLevel = dataSources.AllowedDataSources.GetRequiredConfidenceLevel(); - var agentProvider = this.SettingsManager.GetPreselectedProvider(Tools.Components.AGENT_DATA_SOURCE_SELECTION, provider.ConfiguredProviderId, true); - if (agentProvider == Settings.Provider.NONE) - { - logger.LogWarning("No provider is selected for the agent. The agent cannot select data sources."); - return []; - } - - if (!agentProvider.AllowsDataSourceAccess(this.SettingsManager, requiredDataSecurity, requiredConfidenceLevel)) - { - logger.LogWarning($"The agent for data source selection uses provider '{agentProvider.InstanceName}' with confidence '{agentProvider.GetConfidenceLevel(this.SettingsManager).Name}', but the available data sources require data security '{requiredDataSecurity}' and provider confidence '{requiredConfidenceLevel.Name}'. The agent cannot select data sources."); - return []; - } - - // Assign the provider settings to the agent: - logger.LogInformation($"The agent for the data source selection uses the provider '{agentProvider.InstanceName}' ({agentProvider.UsedLLMProvider.Name}, confidence={agentProvider.UsedLLMProvider.GetConfidence(this.SettingsManager).Level.Name})."); - this.ProviderSettings = agentProvider; - - // - // 2. Prepare the current system and user prompts as input for the agent: - // - var lastPromptContent = lastUserPrompt switch - { - ContentText text => text.Text, - - // Image prompts may be empty, e.g., when the image is too large: - ContentImage image => await image.TryAsBase64(token) is (success: true, { } base64Image) - ? base64Image - : string.Empty, - - // Other content types are not supported yet: - _ => string.Empty, - }; - - if (string.IsNullOrWhiteSpace(lastPromptContent)) - { - logger.LogWarning("The last prompt is empty. The AI cannot select data sources."); - return []; - } - - // - // 3. Prepare the allowed data sources as input for the agent: - // - var additionalData = new Dictionary(); - logger.LogInformation("Preparing the list of allowed data sources for the agent to choose from."); - - var sb = new StringBuilder(); - sb.AppendLineLF("The following data sources are available for selection:"); - foreach (var ds in dataSources.AllowedDataSources) - { - var description = await descriptionService.GetDescriptionAsync(ds, token); - var descriptionPart = string.IsNullOrWhiteSpace(description) ? string.Empty : $", description='{description}'"; - switch (ds) - { - case DataSourceLocalDirectory localDirectory: - sb.AppendLineLF($"- Id={ds.Id}, name='{localDirectory.Name}', type=local directory, path='{localDirectory.Path}'{descriptionPart}"); - break; - - case DataSourceLocalFile localFile: - sb.AppendLineLF($"- Id={ds.Id}, name='{localFile.Name}', type=local file, path='{localFile.FilePath}'{descriptionPart}"); - break; - - case IERIDataSource eriDataSource: - sb.AppendLineLF($"- Id={ds.Id}, name='{eriDataSource.Name}', type=external data source{descriptionPart}"); - break; - } - } - - logger.LogInformation("Prepared the list of allowed data sources for the agent."); - additionalData.Add("availableDataSources", sb.ToString()); - - // - // 4. Let the agent select the data sources: - // - var prompt = $""" - The system prompt is: - - ``` - {chatThread.SystemPrompt} - ``` - - The user prompt is: - - ``` - {lastPromptContent} - ``` - """; - - // Call the agent: - var aiResponse = await this.ProcessInput(new ContentBlock - { - Time = DateTimeOffset.UtcNow, - ContentType = ContentType.TEXT, - Role = ChatRole.USER, - Content = new ContentText - { - Text = prompt, - }, - }, additionalData); - - if(aiResponse.Content is null) - { - logger.LogWarning("The agent did not return a response."); - return []; - } - - switch (aiResponse) - { - - // - // 5. Parse the agent response: - // - case { ContentType: ContentType.TEXT, Content: ContentText textContent }: - { - // - // What we expect is a JSON list of SelectedDataSource objects: - // - var selectedDataSourcesJson = textContent.Text; - - // - // We know how bad LLM may be in generating JSON without surrounding text. - // Thus, we expect the worst and try to extract the JSON list from the text: - // - var json = ModelAnswerJson.ExtractObjectList(selectedDataSourcesJson); - - try - { - var aiSelectedDataSources = JsonSerializer.Deserialize>(json, JSON_SERIALIZER_OPTIONS); - return aiSelectedDataSources ?? []; - } - catch - { - logger.LogWarning("The agent answered with an invalid or unexpected JSON format."); - return []; - } - } - - case { ContentType: ContentType.TEXT }: - logger.LogWarning("The agent answered with an unexpected inner content type."); - return []; - - case { ContentType: ContentType.NONE }: - logger.LogWarning("The agent did not return a response."); - return []; - - default: - logger.LogWarning($"The agent answered with an unexpected content type '{aiResponse.ContentType}'."); - return []; - } - } -} \ No newline at end of file diff --git a/app/MindWork AI Studio/Agents/AgentJsonContext.cs b/app/MindWork AI Studio/Agents/AgentJsonContext.cs deleted file mode 100644 index c1aa7b050..000000000 --- a/app/MindWork AI Studio/Agents/AgentJsonContext.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Text.Json.Serialization; - -using AIStudio.Agents.AssistantAudit; - -namespace AIStudio.Agents; - -/// -/// The contracts with which System.Text.Json reads the answers of the agents, built at compile time. -/// -[JsonSourceGenerationOptions(GenerationMode = JsonSourceGenerationMode.Metadata)] -[JsonSerializable(typeof(List))] -[JsonSerializable(typeof(RetrievalContextValidationResult))] -[JsonSerializable(typeof(AssistantAuditResult))] -internal sealed partial class AgentJsonContext : JsonSerializerContext; \ No newline at end of file diff --git a/app/MindWork AI Studio/Agents/AgentRetrievalContextValidation.cs b/app/MindWork AI Studio/Agents/AgentRetrievalContextValidation.cs deleted file mode 100644 index 6de4a1d45..000000000 --- a/app/MindWork AI Studio/Agents/AgentRetrievalContextValidation.cs +++ /dev/null @@ -1,343 +0,0 @@ -using System.Text.Json; - -using AIStudio.Chat; -using AIStudio.Provider; -using AIStudio.Settings; -using AIStudio.Settings.DataModel; -using AIStudio.Tools.RAG; -using AIStudio.Tools.Services; - -namespace AIStudio.Agents; - -public sealed class AgentRetrievalContextValidation (ILogger logger, ILogger baseLogger, SettingsManager settingsManager, DataSourceService dataSourceService, ThreadSafeRandom rng) : AgentBase(baseLogger, settingsManager, dataSourceService, rng) -{ - #region Overrides of AgentBase - - /// - protected override Type Type => Type.WORKER; - - /// - protected override Tools.Components Component => Tools.Components.AGENT_RETRIEVAL_CONTEXT_VALIDATION; - - /// - public override string Id => "Retrieval Context Validation"; - - /// - protected override string JobDescription => - """ - You receive a system and user prompt as well as a retrieval context as input. Your task is to decide whether this - retrieval context is helpful in processing the prompts or not. You respond with the decision (true or false), - your reasoning, and your confidence in this decision. - - Your response is only one JSON object in the following format: - - ``` - {"decision": true, "reason": "Why did you choose this source?", "confidence": 0.87} - ``` - - You express your confidence as a floating-point number between 0.0 (maximum uncertainty) and - 1.0 (you are absolutely certain that this retrieval context is needed). - - The JSON schema is: - - ``` - { - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "object", - "properties": { - "decision": { - "type": "boolean" - }, - "reason": { - "type": "string" - }, - "confidence": { - "type": "number" - } - }, - "required": [ - "decision", - "reason", - "confidence" - ] - } - ``` - - You do not ask any follow-up questions. You do not address the user. Your response consists solely of - that one JSON object. - """; - - /// - protected override string SystemPrompt(string retrievalContext) => $""" - {this.JobDescription} - - {retrievalContext} - """; - - /// - public override Settings.Provider ProviderSettings { get; set; } = Settings.Provider.NONE; - - /// - /// The retrieval context validation agent does not work with context. Use - /// the process input method instead. - /// - /// The chat thread without any changes. - public override Task ProcessContext(ChatThread chatThread, IDictionary additionalData) => Task.FromResult(chatThread); - - /// - public override async Task ProcessInput(ContentBlock input, IDictionary additionalData) - { - if (input.Content is not ContentText text) - return EMPTY_BLOCK; - - if(text.InitialRemoteWait || text.IsStreaming) - return EMPTY_BLOCK; - - if(string.IsNullOrWhiteSpace(text.Text)) - return EMPTY_BLOCK; - - if(!additionalData.TryGetValue("retrievalContext", out var retrievalContext) || string.IsNullOrWhiteSpace(retrievalContext)) - return EMPTY_BLOCK; - - var thread = this.CreateChatThread(this.SystemPrompt(retrievalContext)); - var userRequest = AddUserRequest(thread, text.Text); - await this.AddAIResponseAsync(thread, userRequest.UserPrompt, userRequest.Time); - - return thread.Blocks[^1]; - } - - /// - public override Task MadeDecision(ContentBlock input) => Task.FromResult(true); - - /// - /// We do not provide any context. This agent will process many retrieval contexts. - /// This would block a huge amount of memory. - /// - /// An empty list. - public override IReadOnlyCollection GetContext() => []; - - /// - /// We do not provide any answers. This agent will process many retrieval contexts. - /// This would block a huge amount of memory. - /// - /// An empty list. - public override IReadOnlyCollection GetAnswers() => []; - - #endregion - - /// - /// Sets the LLM provider for the agent. - /// - /// - /// When you have to call the validation in parallel for many retrieval contexts, - /// you can set the provider once and then call the validation method in parallel. - /// - /// The current LLM provider. When the user doesn't preselect an agent provider, the agent uses this provider. - /// The data security required by the retrieved data. - /// The minimum provider confidence required by the retrieved data. - public bool SetLLMProvider(IProvider provider, DataSourceSecurity requiredDataSecurity = DataSourceSecurity.NOT_SPECIFIED, ConfidenceLevel requiredConfidenceLevel = ConfidenceLevel.NONE) - { - // We start with the provider currently selected by the user: - var agentProvider = this.SettingsManager.GetPreselectedProvider(Tools.Components.AGENT_RETRIEVAL_CONTEXT_VALIDATION, provider.ConfiguredProviderId, true); - if (agentProvider == Settings.Provider.NONE) - { - logger.LogWarning("No provider is selected for the agent."); - this.ProviderSettings = Settings.Provider.NONE; - return false; - } - - if (!agentProvider.AllowsDataSourceAccess(this.SettingsManager, requiredDataSecurity, requiredConfidenceLevel)) - { - logger.LogWarning($"The agent for retrieval context validation uses provider '{agentProvider.InstanceName}' with confidence '{agentProvider.GetConfidenceLevel(this.SettingsManager).Name}', but the retrieved data requires data security '{requiredDataSecurity}' and provider confidence '{requiredConfidenceLevel.Name}'. The agent cannot validate retrieval contexts."); - this.ProviderSettings = Settings.Provider.NONE; - return false; - } - - // Assign the provider settings to the agent: - logger.LogInformation($"The agent for the retrieval context validation uses the provider '{agentProvider.InstanceName}' ({agentProvider.UsedLLMProvider.Name}, confidence={agentProvider.UsedLLMProvider.GetConfidence(this.SettingsManager).Level.Name})."); - this.ProviderSettings = agentProvider; - return true; - } - - /// - /// Validate all retrieval contexts against the last user and the system prompt. - /// - /// The last user prompt. - /// The chat thread. - /// All retrieval contexts to validate, prepared for the AI and thus already filtered for prompt injections. - /// The cancellation token. - /// The validation results. - public async Task> ValidateRetrievalContextsAsync(IContent lastUserPrompt, ChatThread chatThread, IReadOnlyList retrievalContexts, CancellationToken token = default) - { - // Check if the retrieval context validation is enabled: - if (!this.SettingsManager.ConfigurationData.AgentRetrievalContextValidation.EnableRetrievalContextValidation) - return []; - - logger.LogInformation($"Validating {retrievalContexts.Count:###,###,###,###} retrieval contexts."); - - // Prepare the list of validation tasks: - var validationTasks = new List>(retrievalContexts.Count); - - // Read the number of parallel validations: - var numParallelValidations = 3; - if(this.SettingsManager.ConfigurationData.AgentRetrievalContextValidation.PreselectAgentOptions) - numParallelValidations = this.SettingsManager.ConfigurationData.AgentRetrievalContextValidation.NumParallelValidations; - - numParallelValidations = Math.Max(1, numParallelValidations); - - // Use a semaphore to limit the number of parallel validations: - using var semaphore = new SemaphoreSlim(numParallelValidations); - foreach (var retrievalContext in retrievalContexts) - { - // Wait for an available slot in the semaphore: - await semaphore.WaitAsync(token); - - // Start the next validation task: - validationTasks.Add(this.ValidateRetrievalContextAsync(lastUserPrompt, chatThread, retrievalContext, semaphore, token)); - } - - // Wait for all validation tasks to complete: - return await Task.WhenAll(validationTasks); - } - - /// - /// Validates the retrieval context against the last user and the system prompt. - /// - /// - /// Probably, you have a lot of retrieval contexts to validate. In this case, you - /// can call this method in parallel for each retrieval context. You might use - /// the ValidateRetrievalContextsAsync method to validate all retrieval contexts. - /// - /// The last user prompt. - /// The chat thread. - /// The retrieval context to validate, prepared for the AI and thus already filtered for prompt injections. - /// The optional semaphore to limit the number of parallel validations. - /// The cancellation token. - /// The validation result. - public async Task ValidateRetrievalContextAsync(IContent lastUserPrompt, ChatThread chatThread, PreparedRetrievalContext retrievalContext, SemaphoreSlim? semaphore = null, CancellationToken token = default) - { - try - { - // - // Check if the validation was canceled. This could happen when the user - // canceled the validation process or when the validation process took - // too long: - // - if(token.IsCancellationRequested) - return new(false, "The validation was canceled.", 1.0f, retrievalContext); - - // - // 1. Prepare the current system and user prompts as input for the agent: - // - var lastPromptContent = lastUserPrompt switch - { - ContentText text => text.Text, - - // Image prompts may be empty, e.g., when the image is too large: - ContentImage image => await image.TryAsBase64(token) is (success: true, { } base64Image) - ? base64Image - : string.Empty, - - // Other content types are not supported yet: - _ => string.Empty, - }; - - if (string.IsNullOrWhiteSpace(lastPromptContent)) - { - logger.LogWarning("The last prompt is empty. The AI cannot validate the retrieval context."); - return new(false, "The last prompt was empty.", 1.0f, retrievalContext); - } - - // - // 2. Prepare the retrieval context for the agent. It reads the context exactly as the - // AI would, filtered once for both, so the check judges what is actually sent: - // - var additionalData = new Dictionary(); - additionalData.Add("retrievalContext", retrievalContext.ToMarkdown()); - - // - // 3. Let the agent validate the retrieval context: - // - var prompt = $""" - The system prompt is: - - ``` - {chatThread.SystemPrompt} - ``` - - The user prompt is: - - ``` - {lastPromptContent} - ``` - """; - - // Call the agent: - var aiResponse = await this.ProcessInput(new ContentBlock - { - Time = DateTimeOffset.UtcNow, - ContentType = ContentType.TEXT, - Role = ChatRole.USER, - Content = new ContentText - { - Text = prompt, - }, - }, additionalData); - - if (aiResponse.Content is null) - { - logger.LogWarning("The agent did not return a response."); - return new(false, "The agent did not return a response.", 1.0f, retrievalContext); - } - - switch (aiResponse) - { - - // - // 4. Parse the agent response: - // - case { ContentType: ContentType.TEXT, Content: ContentText textContent }: - { - // - // What we expect is one JSON object: - // - var validationJson = textContent.Text; - - // - // We know how bad LLM may be in generating JSON without surrounding text. - // Thus, we expect the worst and try to extract the JSON object from the text: - // - var json = ModelAnswerJson.ExtractObject(validationJson); - - try - { - var result = JsonSerializer.Deserialize(json, JSON_SERIALIZER_OPTIONS); - return result with { RetrievalContext = retrievalContext }; - } - catch - { - logger.LogWarning("The agent answered with an invalid or unexpected JSON format."); - return new(false, "The agent answered with an invalid or unexpected JSON format.", 1.0f, retrievalContext); - } - } - - case { ContentType: ContentType.TEXT }: - logger.LogWarning("The agent answered with an unexpected inner content type."); - return new(false, "The agent answered with an unexpected inner content type.", 1.0f, retrievalContext); - - case { ContentType: ContentType.NONE }: - logger.LogWarning("The agent did not return a response."); - return new(false, "The agent did not return a response.", 1.0f, retrievalContext); - - default: - logger.LogWarning($"The agent answered with an unexpected content type '{aiResponse.ContentType}'."); - return new(false, $"The agent answered with an unexpected content type '{aiResponse.ContentType}'.", 1.0f, retrievalContext); - } - } - finally - { - // Release the semaphore slot: - semaphore?.Release(); - } - } -} \ No newline at end of file diff --git a/app/MindWork AI Studio/Agents/AgentTextContentCleaner.cs b/app/MindWork AI Studio/Agents/AgentTextContentCleaner.cs deleted file mode 100644 index c0b6d5aba..000000000 --- a/app/MindWork AI Studio/Agents/AgentTextContentCleaner.cs +++ /dev/null @@ -1,88 +0,0 @@ -using AIStudio.Chat; -using AIStudio.Settings; -using AIStudio.Tools.Services; - -namespace AIStudio.Agents; - -public sealed class AgentTextContentCleaner(ILogger logger, SettingsManager settingsManager, DataSourceService dataSourceService, ThreadSafeRandom rng) : AgentBase(logger, settingsManager, dataSourceService, rng) -{ - private readonly List context = new(); - private readonly List answers = new(); - - #region Overrides of AgentBase - - public override AIStudio.Settings.Provider ProviderSettings { get; set; } = AIStudio.Settings.Provider.NONE; - - protected override Type Type => Type.SYSTEM; - - protected override Tools.Components Component => Tools.Components.AGENT_TEXT_CONTENT_CLEANER; - - public override string Id => "Text Content Cleaner"; - - protected override string JobDescription => - """ - You receive a Markdown document as input. Your goal is to identify the main content of the document - and return it including Markdown formatting. Remove areas that do not belong to the main part of the - document. For a blog article, return only the text of the article with its formatting. For a scientific - paper, only the contents of the paper. Delete elements of navigation, advertisements, HTML artifacts, - cookie banners, etc. If the content contains images, these images remain. The same applies to links. - Ensure that links and images are present as valid Markdown: - - - Syntax of links: [link text](URL) - - Syntax of images: ![alt text](URL) - - If you find relative links or images with relative paths, correct them to absolute paths. For this - purpose, here is the source URL: - """; - - protected override string SystemPrompt(string additionalData) => $"{this.JobDescription} `{additionalData}`."; - - /// - public override async Task ProcessContext(ChatThread chatThread, IDictionary additionalData) - { - // We process the last block of the chat thread. Then, we add the result - // to the chat thread as the last block: - var answer = await this.ProcessInput(chatThread.Blocks[^1], additionalData); - chatThread.Blocks.Add(answer); - - this.context.Clear(); - this.context.AddRange(chatThread.Blocks); - - return chatThread; - } - - // - public override async Task ProcessInput(ContentBlock input, IDictionary additionalData) - { - if (input.Content is not ContentText text) - return EMPTY_BLOCK; - - if(text.InitialRemoteWait || text.IsStreaming) - return EMPTY_BLOCK; - - if(string.IsNullOrWhiteSpace(text.Text)) - return EMPTY_BLOCK; - - if(!additionalData.TryGetValue("sourceURL", out var sourceURL) || string.IsNullOrWhiteSpace(sourceURL)) - return EMPTY_BLOCK; - - var thread = this.CreateChatThread(this.SystemPrompt(sourceURL)); - var userRequest = AddUserRequest(thread, text.Text); - await this.AddAIResponseAsync(thread, userRequest.UserPrompt, userRequest.Time); - - var answer = thread.Blocks[^1]; - this.answers.Add(answer); - return answer; - } - - // - public override Task MadeDecision(ContentBlock input) => Task.FromResult(true); - - // - public override IReadOnlyCollection GetContext() => this.context; - - // - public override IReadOnlyCollection GetAnswers() => this.answers; - - #endregion -} \ No newline at end of file diff --git a/app/MindWork AI Studio/Agents/AssistantAudit/AssistantAuditLevelExtensions.cs b/app/MindWork AI Studio/Agents/AssistantAudit/AssistantAuditLevelExtensions.cs deleted file mode 100644 index 74cf7593f..000000000 --- a/app/MindWork AI Studio/Agents/AssistantAudit/AssistantAuditLevelExtensions.cs +++ /dev/null @@ -1,50 +0,0 @@ -using AIStudio.Tools.PluginSystem; - -namespace AIStudio.Agents.AssistantAudit; - -public static class AssistantAuditLevelExtensions -{ - private static string TB(string fallbackEN) => I18N.I.T(fallbackEN, typeof(AssistantAuditLevelExtensions).Namespace, nameof(AssistantAuditLevelExtensions)); - - extension(AssistantAuditLevel level) - { - public string Name => level switch - { - AssistantAuditLevel.DANGEROUS => TB("Dangerous"), - AssistantAuditLevel.CAUTION => TB("Concerning"), - AssistantAuditLevel.SAFE => TB("Safe"), - _ => TB("Unknown"), - }; - - public Severity Severity => level switch - { - AssistantAuditLevel.DANGEROUS => Severity.Error, - AssistantAuditLevel.CAUTION => Severity.Warning, - AssistantAuditLevel.SAFE => Severity.Success, - _ => Severity.Info, - }; - - public Color Color => level switch - { - AssistantAuditLevel.DANGEROUS => Color.Error, - AssistantAuditLevel.CAUTION => Color.Warning, - AssistantAuditLevel.SAFE => Color.Success, - _ => Color.Default, - }; - - public string Icon => level switch - { - AssistantAuditLevel.DANGEROUS => AppIcons.SECURITY_DANGEROUS, - AssistantAuditLevel.CAUTION => AppIcons.WARNING, - AssistantAuditLevel.SAFE => AppIcons.AUDIT_SAFE, - _ => AppIcons.UNKNOWN, - }; - - /// - /// Parses an audit level string and falls back to when parsing fails. - /// - /// The audit level text to parse. - /// The parsed audit level, or for null, empty, or invalid values. - public static AssistantAuditLevel ParseOrUnknown(string? value) => Enum.TryParse(value, true, out var parsedLevel) ? parsedLevel : AssistantAuditLevel.UNKNOWN; - } -} diff --git a/app/MindWork AI Studio/Agents/IAgent.cs b/app/MindWork AI Studio/Agents/IAgent.cs deleted file mode 100644 index 3ee77d8ba..000000000 --- a/app/MindWork AI Studio/Agents/IAgent.cs +++ /dev/null @@ -1,55 +0,0 @@ -using AIStudio.Chat; - -namespace AIStudio.Agents; - -public interface IAgent -{ - /// - /// Gets the name of the agent. - /// - public string Id { get; } - - /// - /// The provider to use for this agent. - /// - public Settings.Provider ProviderSettings { get; set; } - - /// - /// Processes a chat thread (i.e., context) and returns the updated thread. - /// - /// The chat thread to process. The thread is the context for the agent. - /// Additional data to use for processing the chat thread. - /// The updated chat thread. The last content block of the thread is the agent's response. - public Task ProcessContext(ChatThread chatThread, IDictionary additionalData); - - /// - /// Processes the input content block and returns the agent's response. - /// - /// The content block to process. It represents the input. - /// Additional data to use for processing the input. - /// The content block representing the agent's response. - public Task ProcessInput(ContentBlock input, IDictionary additionalData); - - /// - /// The agent makes a decision based on the input. - /// - /// The content block to process. Should be a question or a request. - /// - /// True if a decision has been made based on the input, false otherwise. - /// - public Task MadeDecision(ContentBlock input); - - /// - /// Retrieves the context of the agent. - /// - /// The collection of content blocks representing the agent's context. This includes the user's and the other agent's messages. - public IReadOnlyCollection GetContext(); - - /// - /// Retrieves the answers from the agent's context. - /// - /// - /// The collection of content blocks representing the answers provided by this agent. - /// - public IReadOnlyCollection GetAnswers(); -} \ No newline at end of file diff --git a/app/MindWork AI Studio/Agents/Type.cs b/app/MindWork AI Studio/Agents/Type.cs deleted file mode 100644 index 559f10084..000000000 --- a/app/MindWork AI Studio/Agents/Type.cs +++ /dev/null @@ -1,27 +0,0 @@ -namespace AIStudio.Agents; - -public enum Type -{ - /// - /// Represents an unspecified agent type. - /// - UNSPECIFIED = 0, - - /// - /// Represents a conversational agent who produces human-like responses and feedback (depending on the context and its job description). - /// For example, an expert agent for a specific domain. Answers might be detailed and informative. - /// - CONVERSATIONAL, - - /// - /// Represents a worker agent type who performs tasks and provides information or services (depending on the context and its job description). - /// For example, a quality assurance agent who assesses the quality of a product or service. Answers might be short and concise. - /// - WORKER, - - /// - /// Represents the system agent type who processes the input and provides a specific response (depending on the context and its job description). - /// For example, a HTML content agent who processes the arbitrary HTML content and provides a structured Markdown response. Answers might be structured and formatted. - /// - SYSTEM, -} \ No newline at end of file diff --git a/app/MindWork AI Studio/Agents/UserRequest.cs b/app/MindWork AI Studio/Agents/UserRequest.cs deleted file mode 100644 index 216eebe4c..000000000 --- a/app/MindWork AI Studio/Agents/UserRequest.cs +++ /dev/null @@ -1,19 +0,0 @@ -using AIStudio.Chat; - -namespace AIStudio.Agents; - -/// -/// The created user request. -/// -public sealed class UserRequest -{ - /// - /// The time when the request was created. - /// - public required DateTimeOffset Time { get; init; } - - /// - /// The user prompt. - /// - public required IContent UserPrompt { get; init; } -} \ No newline at end of file diff --git a/app/MindWork AI Studio/Assistants/Builder/AssistantBuilder.razor b/app/MindWork AI Studio/Assistants/Builder/AssistantBuilder.razor index 0c3024afd..f198d9f18 100644 --- a/app/MindWork AI Studio/Assistants/Builder/AssistantBuilder.razor +++ b/app/MindWork AI Studio/Assistants/Builder/AssistantBuilder.razor @@ -1,5 +1,5 @@ @attribute [Route(Routes.ASSISTANT_META_ASSISTANT)] -@using AIStudio.Agents.AssistantAudit +@using AIStudio.AIOperations.PluginAudit @using AIStudio.Tools.PluginSystem @using AIStudio.Tools.PluginSystem.Assistants.DataModel @inherits AssistantBaseCore diff --git a/app/MindWork AI Studio/Assistants/Builder/AssistantBuilder.razor.cs b/app/MindWork AI Studio/Assistants/Builder/AssistantBuilder.razor.cs index e41ab3d93..8e524ed58 100644 --- a/app/MindWork AI Studio/Assistants/Builder/AssistantBuilder.razor.cs +++ b/app/MindWork AI Studio/Assistants/Builder/AssistantBuilder.razor.cs @@ -1,4 +1,4 @@ -using AIStudio.Agents.AssistantAudit; +using AIStudio.AIOperations.PluginAudit; using AIStudio.Dialogs; using AIStudio.Dialogs.Settings; using AIStudio.Tools.AssistantSessions; @@ -188,7 +188,7 @@ public partial class AssistantBuilder : AssistantBaseCore this.pluginInstallResult?.Success is true; - private bool AuditCompleted => this.pluginAudit is not null && this.pluginAudit.Level is not AssistantAuditLevel.UNKNOWN; + private bool AuditCompleted => this.pluginAudit is not null && this.pluginAudit.Level is not PluginAuditLevel.UNKNOWN; private bool AuditRequiredForActivation => this.SettingsManager.ConfigurationData.AssistantPluginAudit.RequireAuditBeforeActivation; @@ -216,9 +216,9 @@ public partial class AssistantBuilder : AssistantBaseCore this.pluginAudit?.Level switch { - AssistantAuditLevel.DANGEROUS => Severity.Error, - AssistantAuditLevel.CAUTION => Severity.Warning, - AssistantAuditLevel.SAFE => Severity.Info, + PluginAuditLevel.DANGEROUS => Severity.Error, + PluginAuditLevel.CAUTION => Severity.Warning, + PluginAuditLevel.SAFE => Severity.Info, _ => Severity.Normal, }; @@ -742,8 +742,8 @@ public partial class AssistantBuilder : AssistantBaseCore @@ -26,7 +26,7 @@ else if (this.RootComponent is null) } else { - @if (this.audit is not null && this.audit.Level is not AssistantAuditLevel.SAFE) + @if (this.audit is not null && this.audit.Level is not PluginAuditLevel.SAFE) { diff --git a/app/MindWork AI Studio/Assistants/Dynamic/AssistantDynamic.razor.cs b/app/MindWork AI Studio/Assistants/Dynamic/AssistantDynamic.razor.cs index e27d2681f..8ca176852 100644 --- a/app/MindWork AI Studio/Assistants/Dynamic/AssistantDynamic.razor.cs +++ b/app/MindWork AI Studio/Assistants/Dynamic/AssistantDynamic.razor.cs @@ -1,5 +1,5 @@ using System.Text; -using AIStudio.Agents.AssistantAudit; +using AIStudio.AIOperations.PluginAudit; using AIStudio.Chat; using AIStudio.Dialogs; using AIStudio.Dialogs.Settings; @@ -304,7 +304,7 @@ public partial class AssistantDynamic : AssistantBaseCore if (result.Data is not AssistantPluginRevisionDialogResult revisionResult) return; - this.Logger.LogInformation($"AssistantDynamic of plugin '{revisionResult.PluginName}' ({revisionResult.PluginName}) was successfully revised with audit result {revisionResult.Audit?.Level ?? AssistantAuditLevel.UNKNOWN}."); + this.Logger.LogInformation($"AssistantDynamic of plugin '{revisionResult.PluginName}' ({revisionResult.PluginName}) was successfully revised with audit result {revisionResult.Audit?.Level ?? PluginAuditLevel.UNKNOWN}."); var updatedPlugin = PluginFactory.RunningPlugins.OfType().FirstOrDefault(x => x.Id == revisionResult.PluginId); if (updatedPlugin is not null && !updatedPlugin.StartsChatDirectly) this.ApplyUpdatedAssistantPlugin(updatedPlugin); diff --git a/app/MindWork AI Studio/Assistants/I18N/allTexts.lua b/app/MindWork AI Studio/Assistants/I18N/allTexts.lua index 201581081..938944993 100644 --- a/app/MindWork AI Studio/Assistants/I18N/allTexts.lua +++ b/app/MindWork AI Studio/Assistants/I18N/allTexts.lua @@ -46,47 +46,32 @@ LANG_NAME = "English (United States)" UI_TEXT_CONTENT = {} --- No audit provider is configured. -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITAGENT::T2034826200"] = "No audit provider is configured." - --- The security check could not be completed because the LLM's response was unusable. The audit level remains Unknown, so please try again later. -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITAGENT::T2451573087"] = "The security check could not be completed because the LLM's response was unusable. The audit level remains Unknown, so please try again later." - --- The security check could not be completed because the LLM's response was unusable. The audit level remains Unknown, so please try again later. -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITAGENT::T2451573087::INFORMAL"] = "The security check could not be completed because the LLM's response was unusable. The audit level remains Unknown, so please try again later." - --- The provider is not trusted enough for security checks. -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITAGENT::T2861409367"] = "The provider is not trusted enough for security checks." - --- The audit agent did not return a usable response. -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITAGENT::T3310188890"] = "The audit agent did not return a usable response." - --- No provider is configured for the Security Audit Agent. -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITAGENT::T3605554201"] = "No provider is configured for the Security Audit Agent." - --- The selected provider is not trusted enough for security checks. Pick one which meets the confidence required here, or choose a dedicated provider for security checks in the app settings. -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITAGENT::T4104574219"] = "The selected provider is not trusted enough for security checks. Pick one which meets the confidence required here, or choose a dedicated provider for security checks in the app settings." - --- The selected provider is not trusted enough for security checks. Pick one which meets the confidence required here, or choose a dedicated provider for security checks in the app settings. -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITAGENT::T4104574219::INFORMAL"] = "The selected provider is not trusted enough for security checks. Pick one which meets the confidence required here, or choose a dedicated provider for security checks in the app settings." - --- The audit result was empty. -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITAGENT::T432419958"] = "The audit result was empty." - --- The audit agent returned invalid JSON. -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITAGENT::T917600186"] = "The audit agent returned invalid JSON." - -- Concerning -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITLEVELEXTENSIONS::T1500095429"] = "Concerning" +UI_TEXT_CONTENT["AISTUDIO::AIOPERATIONS::PLUGINAUDIT::PLUGINAUDITLEVELEXTENSIONS::T1500095429"] = "Concerning" -- Dangerous -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITLEVELEXTENSIONS::T3421510547"] = "Dangerous" +UI_TEXT_CONTENT["AISTUDIO::AIOPERATIONS::PLUGINAUDIT::PLUGINAUDITLEVELEXTENSIONS::T3421510547"] = "Dangerous" -- Unknown -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITLEVELEXTENSIONS::T3424652889"] = "Unknown" +UI_TEXT_CONTENT["AISTUDIO::AIOPERATIONS::PLUGINAUDIT::PLUGINAUDITLEVELEXTENSIONS::T3424652889"] = "Unknown" -- Safe -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITLEVELEXTENSIONS::T760494712"] = "Safe" +UI_TEXT_CONTENT["AISTUDIO::AIOPERATIONS::PLUGINAUDIT::PLUGINAUDITLEVELEXTENSIONS::T760494712"] = "Safe" + +-- The security check could not be completed because the LLM's response was unusable. The audit level remains Unknown, so please try again later. +UI_TEXT_CONTENT["AISTUDIO::AIOPERATIONS::PLUGINAUDIT::PLUGINAUDITOPERATION::T2451573087"] = "The security check could not be completed because the LLM's response was unusable. The audit level remains Unknown, so please try again later." + +-- The security check could not be completed because the LLM's response was unusable. The audit level remains Unknown, so please try again later. +UI_TEXT_CONTENT["AISTUDIO::AIOPERATIONS::PLUGINAUDIT::PLUGINAUDITOPERATION::T2451573087::INFORMAL"] = "The security check could not be completed because the LLM's response was unusable. The audit level remains Unknown, so please try again later." + +-- The audit did not return a usable response. +UI_TEXT_CONTENT["AISTUDIO::AIOPERATIONS::PLUGINAUDIT::PLUGINAUDITOPERATION::T391654503"] = "The audit did not return a usable response." + +-- The audit result was empty. +UI_TEXT_CONTENT["AISTUDIO::AIOPERATIONS::PLUGINAUDIT::PLUGINAUDITOPERATION::T432419958"] = "The audit result was empty." + +-- The audit returned invalid JSON. +UI_TEXT_CONTENT["AISTUDIO::AIOPERATIONS::PLUGINAUDIT::PLUGINAUDITOPERATION::T678594297"] = "The audit returned invalid JSON." -- Objective UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::AGENDA::ASSISTANTAGENDA::T1121586136"] = "Objective" @@ -10252,8 +10237,8 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T1160768613"] = "The cont -- The content cleaner uses the model of this assistant. Please select one below. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T1160768613::INFORMAL"] = "The content cleaner uses the model of this assistant. Please select one below." --- The content is cleaned using an LLM agent: the main content is extracted, advertisements and other irrelevant things are attempted to be removed; relative links are attempted to be converted into absolute links so that they can be used. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T1164201762"] = "The content is cleaned using an LLM agent: the main content is extracted, advertisements and other irrelevant things are attempted to be removed; relative links are attempted to be converted into absolute links so that they can be used." +-- The content was loaded, but not cleaned: the model of the content cleaner gave no answer. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T1189712796"] = "The content was loaded, but not cleaned: the model of the content cleaner gave no answer." -- Fetch UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T1396322691"] = "Fetch" @@ -10264,12 +10249,21 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T2235427807"] = "Please p -- Please provide a URL to load the content from. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T2235427807::INFORMAL"] = "Please provide a URL to load the content from." +-- Your organization does not allow the selected model. Please select another model, or configure an eligible one in the app settings. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T2247340324"] = "Your organization does not allow the selected model. Please select another model, or configure an eligible one in the app settings." + +-- Your organization does not allow the selected model. Please select another model, or configure an eligible one in the app settings. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T2247340324::INFORMAL"] = "Your organization does not allow the selected model. Please select another model, or configure an eligible one in the app settings." + -- Loads the content from your URL. Does not work when the content is hidden behind a paywall. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T2672192696"] = "Loads the content from your URL. Does not work when the content is hidden behind a paywall." -- Loads the content from your URL. Does not work when the content is hidden behind a paywall. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T2672192696::INFORMAL"] = "Loads the content from your URL. Does not work when the content is hidden behind a paywall." +-- The text content cleaner, an AI task, extracts the main content, tries to remove advertisements and other clutter, and tries to turn relative links into absolute ones, so that they work. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T2765793850"] = "The text content cleaner, an AI task, extracts the main content, tries to remove advertisements and other clutter, and tries to turn relative links into absolute ones, so that they work." + -- URL from which to load the content UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T2883163022"] = "URL from which to load the content" @@ -10288,6 +10282,9 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T307442288"] = "Please pr -- Please provide a valid HTTP or HTTPS URL. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T307442288::INFORMAL"] = "Please provide a valid HTTP or HTTPS URL." +-- Clean up the content with AI? +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T3375295820"] = "Clean up the content with AI?" + -- No content cleaning UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T3588401674"] = "No content cleaning" @@ -10297,9 +10294,6 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T3825586228"] = "Please p -- Please provide a valid URL. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T3825586228::INFORMAL"] = "Please provide a valid URL." --- Clean up content by using an LLM agent? -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T4057255553"] = "Clean up content by using an LLM agent?" - -- Show web content options UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T4249712357"] = "Show web content options" @@ -10351,6 +10345,12 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SELECTFILE::T4285779702"] = "Choose File" -- External Assistants rated below this audit level are treated as insufficiently reviewed. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T1162151451"] = "External Assistants rated below this audit level are treated as insufficiently reviewed." +-- Optionally choose a dedicated provider for assistant plugin audits. When left empty, AI Studio uses the app-wide default provider, or else the model you choose when auditing. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T1707650617"] = "Optionally choose a dedicated provider for assistant plugin audits. When left empty, AI Studio uses the app-wide default provider, or else the model you choose when auditing." + +-- Optionally choose a dedicated provider for assistant plugin audits. When left empty, AI Studio uses the app-wide default provider, or else the model you choose when auditing. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T1707650617::INFORMAL"] = "Optionally choose a dedicated provider for assistant plugin audits. When left empty, AI Studio uses the app-wide default provider, or else the model you choose when auditing." + -- Users may still activate plugins below the minimum Audit-Level UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T1840342259"] = "Users may still activate plugins below the minimum Audit-Level" @@ -10363,6 +10363,12 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDI -- External Assistants must be audited before activation UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T2065972970"] = "External Assistants must be audited before activation" +-- Before external assistants are activated, a model audits newly installed or updated ones for security risks. AI Studio keeps the latest audit card until the plugin manifest changes. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T2081939459"] = "Before external assistants are activated, a model audits newly installed or updated ones for security risks. AI Studio keeps the latest audit card until the plugin manifest changes." + +-- AI Task: Security Audit for external Assistants +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T2200966468"] = "AI Task: Security Audit for external Assistants" + -- Block activation below the minimum Audit-Level? UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T232834129"] = "Block activation below the minimum Audit-Level?" @@ -10372,8 +10378,14 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDI -- Disabling this setting turns off assistant plugin security audits. External assistants may then be activated and used even without a valid audit or after plugin changes. Do you really want to disable this protection? UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T2516645821::INFORMAL"] = "Disabling this setting turns off assistant plugin security audits. External assistants may then be activated and used even without a valid audit or after plugin changes. Do you really want to disable this protection?" --- Agent: Security Audit for external Assistants -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T2910364422"] = "Agent: Security Audit for external Assistants" +-- Automatic audits cannot run, because no model is available for security checks. Choose one above, or set an app-wide default provider in the app options. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T2857321563"] = "Automatic audits cannot run, because no model is available for security checks. Choose one above, or set an app-wide default provider in the app options." + +-- Automatic audits cannot run, because no model is available for security checks. Choose one above, or set an app-wide default provider in the app options. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T2857321563::INFORMAL"] = "Automatic audits cannot run, because no model is available for security checks. Choose one above, or set an app-wide default provider in the app options." + +-- Use the app default, otherwise the model chosen when auditing +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T2888830822"] = "Use the app default, otherwise the model chosen when auditing" -- External Assistant can be activated without an audit UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T2915620630"] = "External Assistant can be activated without an audit" @@ -10399,101 +10411,101 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDI -- Activation is blocked below the minimum Audit-Level UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T4041192469"] = "Activation is blocked below the minimum Audit-Level" --- Optionally choose a dedicated provider for assistant plugin audits. When left empty, AI Studio falls back to the app-wide default provider. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T4166969352"] = "Optionally choose a dedicated provider for assistant plugin audits. When left empty, AI Studio falls back to the app-wide default provider." +-- When enabled, you can preselect the model for this task and the confidence it needs. Without a preselected model, AI Studio uses the model of the assistant. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T1210631144"] = "When enabled, you can preselect the model for this task and the confidence it needs. Without a preselected model, AI Studio uses the model of the assistant." --- Optionally choose a dedicated provider for assistant plugin audits. When left empty, AI Studio falls back to the app-wide default provider. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T4166969352::INFORMAL"] = "Optionally choose a dedicated provider for assistant plugin audits. When left empty, AI Studio falls back to the app-wide default provider." +-- When enabled, you can preselect the model for this task and the confidence it needs. Without a preselected model, AI Studio uses the model of the assistant. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T1210631144::INFORMAL"] = "When enabled, you can preselect the model for this task and the confidence it needs. Without a preselected model, AI Studio uses the model of the assistant." --- This Agent audits newly installed or updated external Plugin-Assistant for security risks before they are activated and stores the latest audit card until the plugin manifest changes. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T893652865"] = "This Agent audits newly installed or updated external Plugin-Assistant for security risks before they are activated and stores the latest audit card until the plugin manifest changes." +-- When an assistant loads content from the web, a model can clean it up: it extracts the main content, removes advertisements and other irrelevant things, and attempts to convert relative links into absolute links so that they can be used. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T1587139574"] = "When an assistant loads content from the web, a model can clean it up: it extracts the main content, removes advertisements and other irrelevant things, and attempts to convert relative links into absolute links so that they can be used." --- Use Case: this agent is used to clean up text content. It extracts the main content, removes advertisements and other irrelevant things, and attempts to convert relative links into absolute links so that they can be used. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T1299550589"] = "Use Case: this agent is used to clean up text content. It extracts the main content, removes advertisements and other irrelevant things, and attempts to convert relative links into absolute links so that they can be used." +-- Use the model of the assistant +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T2899245972"] = "Use the model of the assistant" --- Agent: Text Content Cleaner Options -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T3517268866"] = "Agent: Text Content Cleaner Options" +-- AI Task: Text Content Cleaner +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T3478589970"] = "AI Task: Text Content Cleaner" -- No options are preselected UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T354528094"] = "No options are preselected" --- When enabled, you can preselect some agent options. This might be useful when you prefer an LLM. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T3577764214"] = "When enabled, you can preselect some agent options. This might be useful when you prefer an LLM." - --- When enabled, you can preselect some agent options. This might be useful when you prefer an LLM. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T3577764214::INFORMAL"] = "When enabled, you can preselect some agent options. This might be useful when you prefer an LLM." - -- Preselect text content cleaner options? UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T3659087305"] = "Preselect text content cleaner options?" -- Options are preselected UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T3875604319"] = "Options are preselected" --- Use Case: this agent is used to select the appropriate data sources for the current prompt. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T2208143316"] = "Use Case: this agent is used to select the appropriate data sources for the current prompt." +-- AI Task: Data Source Selection +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T1227800581"] = "AI Task: Data Source Selection" --- Agent: Data Source Selection Options -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T2258031949"] = "Agent: Data Source Selection Options" +-- When enabled, you can preselect the model for this task and the confidence it needs. Without a preselected model, AI Studio uses the model of the chat. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T2513220366"] = "When enabled, you can preselect the model for this task and the confidence it needs. Without a preselected model, AI Studio uses the model of the chat." + +-- When enabled, you can preselect the model for this task and the confidence it needs. Without a preselected model, AI Studio uses the model of the chat. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T2513220366::INFORMAL"] = "When enabled, you can preselect the model for this task and the confidence it needs. Without a preselected model, AI Studio uses the model of the chat." + +-- In classic RAG, which searches the data sources with every message, a model first selects the data sources which fit the current prompt. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T2522862914"] = "In classic RAG, which searches the data sources with every message, a model first selects the data sources which fit the current prompt." + +-- Use the model of the chat +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T3435835378"] = "Use the model of the chat" -- No options are preselected UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T354528094"] = "No options are preselected" --- When enabled, you can preselect some agent options. This might be useful when you prefer an LLM. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T3577764214"] = "When enabled, you can preselect some agent options. This might be useful when you prefer an LLM." - --- When enabled, you can preselect some agent options. This might be useful when you prefer an LLM. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T3577764214::INFORMAL"] = "When enabled, you can preselect some agent options. This might be useful when you prefer an LLM." - -- Options are preselected UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T3875604319"] = "Options are preselected" -- Preselect data source selection options? UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T991598424"] = "Preselect data source selection options?" --- Use Case: this agent is used to validate any retrieval context of any retrieval process. Perhaps there are many of these retrieval contexts and you want to validate them all. Therefore, you might want to use a cheap and fast LLM for this job. When using a local or self-hosted LLM, look for a small (e.g. 3B) and fast model. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T1326813386"] = "Use Case: this agent is used to validate any retrieval context of any retrieval process. Perhaps there are many of these retrieval contexts and you want to validate them all. Therefore, you might want to use a cheap and fast LLM for this job. When using a local or self-hosted LLM, look for a small (e.g. 3B) and fast model." +-- Each validation is a request of its own, so more simultaneous validations mean as many simultaneous requests. Some providers limit the number of requests per minute. When you are unsure, choose a low setting between 1 and 6 validations. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T1490986595"] = "Each validation is a request of its own, so more simultaneous validations mean as many simultaneous requests. Some providers limit the number of requests per minute. When you are unsure, choose a low setting between 1 and 6 validations." --- Use Case: this agent is used to validate any retrieval context of any retrieval process. Perhaps there are many of these retrieval contexts and you want to validate them all. Therefore, you might want to use a cheap and fast LLM for this job. When using a local or self-hosted LLM, look for a small (e.g. 3B) and fast model. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T1326813386::INFORMAL"] = "Use Case: this agent is used to validate any retrieval context of any retrieval process. Perhaps there are many of these retrieval contexts and you want to validate them all. Therefore, you might want to use a cheap and fast LLM for this job. When using a local or self-hosted LLM, look for a small (e.g. 3B) and fast model." +-- Each validation is a request of its own, so more simultaneous validations mean as many simultaneous requests. Some providers limit the number of requests per minute. When you are unsure, choose a low setting between 1 and 6 validations. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T1490986595::INFORMAL"] = "Each validation is a request of its own, so more simultaneous validations mean as many simultaneous requests. Some providers limit the number of requests per minute. When you are unsure, choose a low setting between 1 and 6 validations." --- The validation agent is enabled -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T2274149855"] = "The validation agent is enabled" +-- AI Task: Retrieval Context Validation +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T1717726852"] = "AI Task: Retrieval Context Validation" --- Enable the retrieval context validation agent? -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T2663872937"] = "Enable the retrieval context validation agent?" +-- How many validations should run simultaneously? +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T2326205445"] = "How many validations should run simultaneously?" + +-- When enabled, a model checks each retrieval context of classic RAG, whether it makes sense for the given prompt. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T240073404"] = "When enabled, a model checks each retrieval context of classic RAG, whether it makes sense for the given prompt." + +-- Validate the retrieval contexts? +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T2428915017"] = "Validate the retrieval contexts?" + +-- When enabled, you can preselect the model for this task, the confidence it needs, and how many validations run simultaneously. Without a preselected model, AI Studio uses the model of the chat. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T2520295642"] = "When enabled, you can preselect the model for this task, the confidence it needs, and how many validations run simultaneously. Without a preselected model, AI Studio uses the model of the chat." + +-- When enabled, you can preselect the model for this task, the confidence it needs, and how many validations run simultaneously. Without a preselected model, AI Studio uses the model of the chat. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T2520295642::INFORMAL"] = "When enabled, you can preselect the model for this task, the confidence it needs, and how many validations run simultaneously. Without a preselected model, AI Studio uses the model of the chat." -- Preselect retrieval context validation options? UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T2663938643"] = "Preselect retrieval context validation options?" --- agents -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T2669785679"] = "agents" - --- When enabled, the retrieval context validation agent will check each retrieval context of any retrieval process, whether a context makes sense for the given prompt. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T298440039"] = "When enabled, the retrieval context validation agent will check each retrieval context of any retrieval process, whether a context makes sense for the given prompt." - --- How many validation agents should work simultaneously? -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T3431541788"] = "How many validation agents should work simultaneously?" +-- Use the model of the chat +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T3435835378"] = "Use the model of the chat" -- No options are preselected UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T354528094"] = "No options are preselected" --- When enabled, you can preselect some agent options. This might be useful when you prefer an LLM. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T3577764214"] = "When enabled, you can preselect some agent options. This might be useful when you prefer an LLM." - --- When enabled, you can preselect some agent options. This might be useful when you prefer an LLM. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T3577764214::INFORMAL"] = "When enabled, you can preselect some agent options. This might be useful when you prefer an LLM." - --- More active agents also mean that a corresponding number of requests are made simultaneously. Some providers limit the number of requests per minute. When you are unsure, choose a low setting between 1 to 6 agents. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T3819544890"] = "More active agents also mean that a corresponding number of requests are made simultaneously. Some providers limit the number of requests per minute. When you are unsure, choose a low setting between 1 to 6 agents." - --- More active agents also mean that a corresponding number of requests are made simultaneously. Some providers limit the number of requests per minute. When you are unsure, choose a low setting between 1 to 6 agents. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T3819544890::INFORMAL"] = "More active agents also mean that a corresponding number of requests are made simultaneously. Some providers limit the number of requests per minute. When you are unsure, choose a low setting between 1 to 6 agents." - -- Options are preselected UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T3875604319"] = "Options are preselected" --- Agent: Retrieval Context Validation Options -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T928989804"] = "Agent: Retrieval Context Validation Options" +-- validations +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T595734827"] = "validations" + +-- Each retrieval context is validated +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T705018823"] = "Each retrieval context is validated" + +-- In classic RAG, a model checks each retrieval context, i.e., each passage found in the data sources, whether it fits the current prompt. There can be many of them, so you might want to use a cheap and fast model for this job. When using a local or self-hosted model, look for a small (e.g., 3B) and fast one. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T765642962"] = "In classic RAG, a model checks each retrieval context, i.e., each passage found in the data sources, whether it fits the current prompt. There can be many of them, so you might want to use a cheap and fast model for this job. When using a local or self-hosted model, look for a small (e.g., 3B) and fast one." + +-- In classic RAG, a model checks each retrieval context, i.e., each passage found in the data sources, whether it fits the current prompt. There can be many of them, so you might want to use a cheap and fast model for this job. When using a local or self-hosted model, look for a small (e.g., 3B) and fast one. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T765642962::INFORMAL"] = "In classic RAG, a model checks each retrieval context, i.e., each passage found in the data sources, whether it fits the current prompt. There can be many of them, so you might want to use a cheap and fast model for this job. When using a local or self-hosted model, look for a small (e.g., 3B) and fast one." -- No validation is performed UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T95175095"] = "No validation is performed" @@ -10507,6 +10519,12 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAPP::T1118505044"] -- Do you want to show preview features in the app? UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAPP::T1118505044::INFORMAL"] = "Do you want to show preview features in the app?" +-- When enabled, requests to self-hosted providers and LiteLLM name the feature that sent them, e.g., the chat, an assistant, or an AI task, together with the version of AI Studio and your operating system. This lets the operators of these servers, usually your organization, see which features are used. Cloud providers never receive these details, and AI Studio never sends anything to its developers. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAPP::T1140234771"] = "When enabled, requests to self-hosted providers and LiteLLM name the feature that sent them, e.g., the chat, an assistant, or an AI task, together with the version of AI Studio and your operating system. This lets the operators of these servers, usually your organization, see which features are used. Cloud providers never receive these details, and AI Studio never sends anything to its developers." + +-- When enabled, requests to self-hosted providers and LiteLLM name the feature that sent them, e.g., the chat, an assistant, or an AI task, together with the version of AI Studio and your operating system. This lets the operators of these servers, usually your organization, see which features are used. Cloud providers never receive these details, and AI Studio never sends anything to its developers. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAPP::T1140234771::INFORMAL"] = "When enabled, requests to self-hosted providers and LiteLLM name the feature that sent them, e.g., the chat, an assistant, or an AI task, together with the version of AI Studio and your operating system. This lets the operators of these servers, usually your organization, see which features are used. Cloud providers never receive these details, and AI Studio never sends anything to its developers." + -- AI Studio cannot check for updates when running as a Flatpak. Updates are managed outside the app. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAPP::T1190632518"] = "AI Studio cannot check for updates when running as a Flatpak. Updates are managed outside the app." @@ -10612,12 +10630,6 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAPP::T1907446663"] -- Select the language for the app. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAPP::T1907446663::INFORMAL"] = "Select the language for the app." --- When enabled, requests to self-hosted providers and LiteLLM name the feature that sent them, e.g., the chat, an assistant, or an agent, together with the version of AI Studio and your operating system. This lets the operators of these servers, usually your organization, see which features are used. Cloud providers never receive these details, and AI Studio never sends anything to its developers. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAPP::T1907749697"] = "When enabled, requests to self-hosted providers and LiteLLM name the feature that sent them, e.g., the chat, an assistant, or an agent, together with the version of AI Studio and your operating system. This lets the operators of these servers, usually your organization, see which features are used. Cloud providers never receive these details, and AI Studio never sends anything to its developers." - --- When enabled, requests to self-hosted providers and LiteLLM name the feature that sent them, e.g., the chat, an assistant, or an agent, together with the version of AI Studio and your operating system. This lets the operators of these servers, usually your organization, see which features are used. Cloud providers never receive these details, and AI Studio never sends anything to its developers. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAPP::T1907749697::INFORMAL"] = "When enabled, requests to self-hosted providers and LiteLLM name the feature that sent them, e.g., the chat, an assistant, or an agent, together with the version of AI Studio and your operating system. This lets the operators of these servers, usually your organization, see which features are used. Cloud providers never receive these details, and AI Studio never sends anything to its developers." - -- Your organization has disabled update checks and installations. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAPP::T1909339369"] = "Your organization has disabled update checks and installations." @@ -11923,6 +11935,12 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T193192210"] = " -- null UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T1996966820"] = "null" +-- The model set for security checks no longer exists. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T2001789726"] = "The model set for security checks no longer exists. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings." + +-- The model set for security checks no longer exists. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T2001789726::INFORMAL"] = "The model set for security checks no longer exists. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings." + -- Properties UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T2177370620"] = "Properties" @@ -11941,9 +11959,27 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T273798258"] = " -- Size UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T2789707388"] = "Size" +-- Your organization does not allow the model set for security checks. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T2882229141"] = "Your organization does not allow the model set for security checks. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings." + +-- Your organization does not allow the model set for security checks. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T2882229141::INFORMAL"] = "Your organization does not allow the model set for security checks. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings." + +-- The model set for security checks is not trusted enough for them. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T2917601715"] = "The model set for security checks is not trusted enough for them. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings." + +-- The model set for security checks is not trusted enough for them. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T2917601715::INFORMAL"] = "The model set for security checks is not trusted enough for them. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings." + -- No model configured UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T2941224401"] = "No model configured" +-- No model is set for security checks, neither for this AI task nor for the app as a whole. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T3013234535"] = "No model is set for security checks, neither for this AI task nor for the app as a whole. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings." + +-- No model is set for security checks, neither for this AI task nor for the app as a whole. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T3013234535::INFORMAL"] = "No model is set for security checks, neither for this AI task nor for the app as a whole. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings." + -- Prompt: set UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T3156437951"] = "Prompt: set" @@ -12001,12 +12037,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T521056824::INFO -- Audit model UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T532102309"] = "Audit model" --- No model is set for security checks, neither for this agent nor for the app as a whole. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings. -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T614645381"] = "No model is set for security checks, neither for this agent nor for the app as a whole. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings." - --- No model is set for security checks, neither for this agent nor for the app as a whole. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings. -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T614645381::INFORMAL"] = "No model is set for security checks, neither for this agent nor for the app as a whole. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings." - -- System Prompt UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T628396066"] = "System Prompt" @@ -16591,9 +16621,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGJOBPOSTINGS::T386176 -- When enabled, you can preselect some job posting options. This might be useful when you prefer a specific LLM model. UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGJOBPOSTINGS::T3861766667::INFORMAL"] = "When enabled, you can preselect some job posting options. This might be useful when you prefer a specific LLM model." --- Content cleaner agent is preselected -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T1013787967"] = "Content cleaner agent is preselected" - -- Web content reader is shown UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T1030372436"] = "Web content reader is shown" @@ -16621,8 +16648,11 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T1766361 -- Choose whether the assistant should use the app default profile, no profile, or a specific profile. UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T1766361623::INFORMAL"] = "Choose whether the assistant should use the app default profile, no profile, or a specific profile." --- Content cleaner agent is not preselected -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T1969816694"] = "Content cleaner agent is not preselected" +-- When enabled, the text content cleaner is preselected. This might be useful when you prefer to clean up the legal content before translating it. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T1958081245"] = "When enabled, the text content cleaner is preselected. This might be useful when you prefer to clean up the legal content before translating it." + +-- When enabled, the text content cleaner is preselected. This might be useful when you prefer to clean up the legal content before translating it. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T1958081245::INFORMAL"] = "When enabled, the text content cleaner is preselected. This might be useful when you prefer to clean up the legal content before translating it." -- When enabled, the web content reader is preselected. This might be useful when you prefer to load legal content from the web very often. UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T1993094764"] = "When enabled, the web content reader is preselected. This might be useful when you prefer to load legal content from the web very often." @@ -16642,27 +16672,27 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T2529161 -- Web content reader is hidden UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T2799795311"] = "Web content reader is hidden" +-- Text content cleaner is not preselected +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T284131714"] = "Text content cleaner is not preselected" + +-- Preselect the text content cleaner? +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T2981779520"] = "Preselect the text content cleaner?" + -- Close UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T3448155331"] = "Close" -- Web content reader is preselected UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T3641773985"] = "Web content reader is preselected" --- Preselect the content cleaner agent? -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T3649428096"] = "Preselect the content cleaner agent?" - -- Assistant: Legal Check Options UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T4033382756"] = "Assistant: Legal Check Options" --- When enabled, the content cleaner agent is preselected. This might be useful when you prefer to clean up the legal content before translating it. -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T4049873385"] = "When enabled, the content cleaner agent is preselected. This might be useful when you prefer to clean up the legal content before translating it." - --- When enabled, the content cleaner agent is preselected. This might be useful when you prefer to clean up the legal content before translating it. -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T4049873385::INFORMAL"] = "When enabled, the content cleaner agent is preselected. This might be useful when you prefer to clean up the legal content before translating it." - -- Preselect the web content reader? UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T629158142"] = "Preselect the web content reader?" +-- Text content cleaner is preselected +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T845988899"] = "Text content cleaner is preselected" + -- No preset preselected UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGMODELCOMPARISON::T1028082569"] = "No preset preselected" @@ -17101,9 +17131,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSLIDEBUILDER::T99564 -- A slide holds at most this many bullet points, in all of its text slots together. Match it to the room for text in the layouts of your template. UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSLIDEBUILDER::T995644230::INFORMAL"] = "A slide holds at most this many bullet points, in all of its text slots together. Match it to the room for text in the layouts of your template." --- Content cleaner agent is preselected -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T1013787967"] = "Content cleaner agent is preselected" - -- Web content reader is shown UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T1030372436"] = "Web content reader is shown" @@ -17119,9 +17146,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T16331 -- Web content reader is not preselected UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T1701127912"] = "Web content reader is not preselected" --- Content cleaner agent is not preselected -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T1969816694"] = "Content cleaner agent is not preselected" - -- Hide the web content reader? UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T2090693677"] = "Hide the web content reader?" @@ -17131,21 +17155,27 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T21718 -- No SWOT analysis options are preselected UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T2361666775"] = "No SWOT analysis options are preselected" +-- When enabled, the text content cleaner is preselected for cleaning website content before it is analyzed. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T2429021439"] = "When enabled, the text content cleaner is preselected for cleaning website content before it is analyzed." + -- Preselect SWOT analysis options? UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T2593950994"] = "Preselect SWOT analysis options?" -- Web content reader is hidden UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T2799795311"] = "Web content reader is hidden" +-- Text content cleaner is not preselected +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T284131714"] = "Text content cleaner is not preselected" + +-- Preselect the text content cleaner? +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T2981779520"] = "Preselect the text content cleaner?" + -- When enabled, the web content reader is preselected. This is useful when you often analyze content from websites. UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T3088856907"] = "When enabled, the web content reader is preselected. This is useful when you often analyze content from websites." -- When enabled, the web content reader is preselected. This is useful when you often analyze content from websites. UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T3088856907::INFORMAL"] = "When enabled, the web content reader is preselected. This is useful when you often analyze content from websites." --- When enabled, the content cleaner agent is preselected for cleaning website content before it is analyzed. -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T332064979"] = "When enabled, the content cleaner agent is preselected for cleaning website content before it is analyzed." - -- Close UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T3448155331"] = "Close" @@ -17155,9 +17185,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T35473 -- Web content reader is preselected UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T3641773985"] = "Web content reader is preselected" --- Preselect the content cleaner agent? -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T3649428096"] = "Preselect the content cleaner agent?" - -- Specify topics the SWOT analysis should pay particular attention to. UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T3857591121"] = "Specify topics the SWOT analysis should pay particular attention to." @@ -17173,6 +17200,9 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T62915 -- Preselect an analysis focus UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T656094797"] = "Preselect an analysis focus" +-- Text content cleaner is preselected +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T845988899"] = "Text content cleaner is preselected" + -- When enabled, you can preselect the SWOT analysis options. This is useful when you prefer a specific language, analysis focus, or LLM. UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T975761680"] = "When enabled, you can preselect the SWOT analysis options. This is useful when you prefer a specific language, analysis focus, or LLM." @@ -17209,9 +17239,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSYNONYMS::T388911788 -- Preselect synonym options? UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSYNONYMS::T4170921846"] = "Preselect synonym options?" --- Content cleaner agent is preselected -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T1013787967"] = "Content cleaner agent is preselected" - -- Web content reader is shown UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T1030372436"] = "Web content reader is shown" @@ -17227,12 +17254,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T141 -- Preselect another target language UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T1462295644"] = "Preselect another target language" --- When enabled, the content cleaner agent is preselected. This might be useful when you prefer to clean up the content before summarizing it. -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T154694569"] = "When enabled, the content cleaner agent is preselected. This might be useful when you prefer to clean up the content before summarizing it." - --- When enabled, the content cleaner agent is preselected. This might be useful when you prefer to clean up the content before summarizing it. -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T154694569::INFORMAL"] = "When enabled, the content cleaner agent is preselected. This might be useful when you prefer to clean up the content before summarizing it." - -- When activated, the web content reader is hidden and cannot be used. As a result, the user interface becomes a bit easier to use. UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T1633101895"] = "When activated, the web content reader is hidden and cannot be used. As a result, the user interface becomes a bit easier to use." @@ -17242,9 +17263,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T170 -- Assistant: Text Summarizer Options UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T1767527569"] = "Assistant: Text Summarizer Options" --- Content cleaner agent is not preselected -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T1969816694"] = "Content cleaner agent is not preselected" - -- Hide the web content reader? UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T2090693677"] = "Hide the web content reader?" @@ -17260,6 +17278,12 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T244 -- Web content reader is hidden UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T2799795311"] = "Web content reader is hidden" +-- Text content cleaner is not preselected +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T284131714"] = "Text content cleaner is not preselected" + +-- Preselect the text content cleaner? +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T2981779520"] = "Preselect the text content cleaner?" + -- No summarizer options are preselected UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T3215334223"] = "No summarizer options are preselected" @@ -17278,12 +17302,15 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T354 -- Web content reader is preselected UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T3641773985"] = "Web content reader is preselected" --- Preselect the content cleaner agent? -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T3649428096"] = "Preselect the content cleaner agent?" - -- Preselect important aspects UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T3705987833"] = "Preselect important aspects" +-- When enabled, the text content cleaner is preselected. This might be useful when you prefer to clean up the content before summarizing it. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T402180229"] = "When enabled, the text content cleaner is preselected. This might be useful when you prefer to clean up the content before summarizing it." + +-- When enabled, the text content cleaner is preselected. This might be useful when you prefer to clean up the content before summarizing it. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T402180229::INFORMAL"] = "When enabled, the text content cleaner is preselected. This might be useful when you prefer to clean up the content before summarizing it." + -- Which summarizer complexity should be preselected? UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T408530182"] = "Which summarizer complexity should be preselected?" @@ -17299,8 +17326,8 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T511 -- Preselect the web content reader? UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T629158142"] = "Preselect the web content reader?" --- Content cleaner agent is preselected -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T1013787967"] = "Content cleaner agent is preselected" +-- Text content cleaner is preselected +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T845988899"] = "Text content cleaner is preselected" -- Assistant: Translator Options UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T1016384269"] = "Assistant: Translator Options" @@ -17326,8 +17353,11 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T170112 -- Live translation is not preselected UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T1825690873"] = "Live translation is not preselected" --- Content cleaner agent is not preselected -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T1969816694"] = "Content cleaner agent is not preselected" +-- When enabled, the text content cleaner is preselected. This might be useful when you prefer to clean up the content before translating it. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T1936357390"] = "When enabled, the text content cleaner is preselected. This might be useful when you prefer to clean up the content before translating it." + +-- When enabled, the text content cleaner is preselected. This might be useful when you prefer to clean up the content before translating it. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T1936357390::INFORMAL"] = "When enabled, the text content cleaner is preselected. This might be useful when you prefer to clean up the content before translating it." -- Preselect translator options? UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T1989346399"] = "Preselect translator options?" @@ -17344,9 +17374,15 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T243574 -- Web content reader is hidden UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T2799795311"] = "Web content reader is hidden" +-- Text content cleaner is not preselected +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T284131714"] = "Text content cleaner is not preselected" + -- No translator options are preselected UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T2866358796"] = "No translator options are preselected" +-- Preselect the text content cleaner? +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T2981779520"] = "Preselect the text content cleaner?" + -- Close UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T3448155331"] = "Close" @@ -17362,9 +17398,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T354826 -- Web content reader is preselected UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T3641773985"] = "Web content reader is preselected" --- Preselect the content cleaner agent? -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T3649428096"] = "Preselect the content cleaner agent?" - -- When enabled, you can preselect the translator options. This might be useful when you prefer a specific target language or LLM model. UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T4195511669"] = "When enabled, you can preselect the translator options. This might be useful when you prefer a specific target language or LLM model." @@ -17374,11 +17407,8 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T419551 -- Preselect the web content reader? UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T629158142"] = "Preselect the web content reader?" --- When enabled, the content cleaner agent is preselected. This might be useful when you prefer to clean up the content before translating it. -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T82436938"] = "When enabled, the content cleaner agent is preselected. This might be useful when you prefer to clean up the content before translating it." - --- When enabled, the content cleaner agent is preselected. This might be useful when you prefer to clean up the content before translating it. -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T82436938::INFORMAL"] = "When enabled, the content cleaner agent is preselected. This might be useful when you prefer to clean up the content before translating it." +-- Text content cleaner is preselected +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T845988899"] = "Text content cleaner is preselected" -- How fast should the live translation react? UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T884246296"] = "How fast should the live translation react?" @@ -18178,12 +18208,6 @@ UI_TEXT_CONTENT["AISTUDIO::PAGES::ASSISTANTS::T3011450657"] = "My Tasks" -- E-Mail UI_TEXT_CONTENT["AISTUDIO::PAGES::ASSISTANTS::T3026443472"] = "E-Mail" --- The automatic security audit for the assistant plugin '{0}' failed. Please run it manually from the plugins page. -UI_TEXT_CONTENT["AISTUDIO::PAGES::ASSISTANTS::T311775455"] = "The automatic security audit for the assistant plugin '{0}' failed. Please run it manually from the plugins page." - --- The automatic security audit for the assistant plugin '{0}' failed. Please run it manually from the plugins page. -UI_TEXT_CONTENT["AISTUDIO::PAGES::ASSISTANTS::T311775455::INFORMAL"] = "The automatic security audit for the assistant plugin '{0}' failed. Please run it manually from the plugins page." - -- Translate AI Studio text content into other languages UI_TEXT_CONTENT["AISTUDIO::PAGES::ASSISTANTS::T3181803840"] = "Translate AI Studio text content into other languages" @@ -19510,12 +19534,6 @@ UI_TEXT_CONTENT["AISTUDIO::PAGES::PLUGINS::T3974628410"] = "Please drop only one -- Please drop only one plugin archive at a time. UI_TEXT_CONTENT["AISTUDIO::PAGES::PLUGINS::T3974628410::INFORMAL"] = "Please drop only one plugin archive at a time." --- The automatic security audit for the assistant plugin '{0}' failed. Please run it manually. -UI_TEXT_CONTENT["AISTUDIO::PAGES::PLUGINS::T4066679817"] = "The automatic security audit for the assistant plugin '{0}' failed. Please run it manually." - --- The automatic security audit for the assistant plugin '{0}' failed. Please run it manually. -UI_TEXT_CONTENT["AISTUDIO::PAGES::PLUGINS::T4066679817::INFORMAL"] = "The automatic security audit for the assistant plugin '{0}' failed. Please run it manually." - -- The assistant plugin '{0}' has been successfully revised. UI_TEXT_CONTENT["AISTUDIO::PAGES::PLUGINS::T4157246824"] = "The assistant plugin '{0}' has been successfully revised." @@ -21541,6 +21559,54 @@ UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLAINFILEEXPORT::T1713926719"] = "The export s -- The export failed. UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLAINFILEEXPORT::T1895034475"] = "The export failed." +-- The organization does not allow the provider for security checks. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T1679509394"] = "The organization does not allow the provider for security checks." + +-- AI Studio did not audit new or updated assistant plugins automatically, because no model is set for security checks, and there is no app-wide default either. Choose a model for security checks in the settings. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T1994155532"] = "AI Studio did not audit new or updated assistant plugins automatically, because no model is set for security checks, and there is no app-wide default either. Choose a model for security checks in the settings." + +-- AI Studio did not audit new or updated assistant plugins automatically, because no model is set for security checks, and there is no app-wide default either. Choose a model for security checks in the settings. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T1994155532::INFORMAL"] = "AI Studio did not audit new or updated assistant plugins automatically, because no model is set for security checks, and there is no app-wide default either. Choose a model for security checks in the settings." + +-- No audit provider is configured. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T2034826200"] = "No audit provider is configured." + +-- Your organization does not allow the provider for security checks. Pick another one, or choose a dedicated provider for security checks in the app settings. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T2109782167"] = "Your organization does not allow the provider for security checks. Pick another one, or choose a dedicated provider for security checks in the app settings." + +-- Your organization does not allow the provider for security checks. Pick another one, or choose a dedicated provider for security checks in the app settings. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T2109782167::INFORMAL"] = "Your organization does not allow the provider for security checks. Pick another one, or choose a dedicated provider for security checks in the app settings." + +-- The provider is not trusted enough for security checks. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T2861409367"] = "The provider is not trusted enough for security checks." + +-- The automatic security audit for the assistant plugin '{0}' failed. Please run it manually on the plugins page. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T3322815862"] = "The automatic security audit for the assistant plugin '{0}' failed. Please run it manually on the plugins page." + +-- The automatic security audit for the assistant plugin '{0}' failed. Please run it manually on the plugins page. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T3322815862::INFORMAL"] = "The automatic security audit for the assistant plugin '{0}' failed. Please run it manually on the plugins page." + +-- AI Studio did not audit new or updated assistant plugins automatically, because the model for security checks is not trusted enough. Choose another one in the settings. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T3336137740"] = "AI Studio did not audit new or updated assistant plugins automatically, because the model for security checks is not trusted enough. Choose another one in the settings." + +-- AI Studio did not audit new or updated assistant plugins automatically, because the model for security checks is not trusted enough. Choose another one in the settings. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T3336137740::INFORMAL"] = "AI Studio did not audit new or updated assistant plugins automatically, because the model for security checks is not trusted enough. Choose another one in the settings." + +-- No provider is configured for security checks. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T3445977179"] = "No provider is configured for security checks." + +-- AI Studio did not audit new or updated assistant plugins automatically, because your organization does not allow the model for security checks. Choose another one in the settings. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T399386793"] = "AI Studio did not audit new or updated assistant plugins automatically, because your organization does not allow the model for security checks. Choose another one in the settings." + +-- AI Studio did not audit new or updated assistant plugins automatically, because your organization does not allow the model for security checks. Choose another one in the settings. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T399386793::INFORMAL"] = "AI Studio did not audit new or updated assistant plugins automatically, because your organization does not allow the model for security checks. Choose another one in the settings." + +-- The selected provider is not trusted enough for security checks. Pick one which meets the confidence required here, or choose a dedicated provider for security checks in the app settings. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T4104574219"] = "The selected provider is not trusted enough for security checks. Pick one which meets the confidence required here, or choose a dedicated provider for security checks in the app settings." + +-- The selected provider is not trusted enough for security checks. Pick one which meets the confidence required here, or choose a dedicated provider for security checks in the app settings. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T4104574219::INFORMAL"] = "The selected provider is not trusted enough for security checks. Pick one which meets the confidence required here, or choose a dedicated provider for security checks in the app settings." + -- Text UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::DATAMODEL::ASSISTANTCOMPONENTTYPEEXTENSIONS::T1041509726"] = "Text" diff --git a/app/MindWork AI Studio/Chat/Compression/ChatCompression.cs b/app/MindWork AI Studio/Chat/Compression/ChatCompression.cs index caaca7d75..a8fc9b491 100644 --- a/app/MindWork AI Studio/Chat/Compression/ChatCompression.cs +++ b/app/MindWork AI Studio/Chat/Compression/ChatCompression.cs @@ -52,7 +52,7 @@ public static class ChatCompression /// still has the message being written in that field, so such a message is summarized instead.

/// /// What described the last request of the compressed chat is reset, as after a rollback: the data - /// retrieved for it and the data sources an agent picked. The restrictions only tighten, by those + /// retrieved for it and the data sources an AI operation picked. The restrictions only tighten, by those /// the summary brings along, see AssistantLaunchService.CreateTextPayloadAsync.

/// /// The last answer keeps what AI Studio noted about its tool calls and sources. The web addresses diff --git a/app/MindWork AI Studio/Chat/ContentText.cs b/app/MindWork AI Studio/Chat/ContentText.cs index 64940861e..95847afd8 100644 --- a/app/MindWork AI Studio/Chat/ContentText.cs +++ b/app/MindWork AI Studio/Chat/ContentText.cs @@ -200,7 +200,7 @@ public sealed class ContentText : IContent { try { - // Most answers, those of the agents among them, received nothing to store, and need no database: + // Most answers, those of the AI operations among them, received nothing to store, and need no database: if (!this.SourcePassages.Any(passage => passage.HoldsTextsToStore)) return; diff --git a/app/MindWork AI Studio/Chat/ImageSourceExtensions.cs b/app/MindWork AI Studio/Chat/ImageSourceExtensions.cs index 5c0ee6f03..a87ee28ad 100644 --- a/app/MindWork AI Studio/Chat/ImageSourceExtensions.cs +++ b/app/MindWork AI Studio/Chat/ImageSourceExtensions.cs @@ -38,7 +38,7 @@ public static class ImageSourceExtensions ///
/// /// This is for the images inside the content of a chat, which go to external data sources and - /// agents as they are. Attached images, which go to a model, take ModelImageService instead: it + /// AI operations as they are. Attached images, which go to a model, take ModelImageService instead: it /// scales them down and encodes them anew within the limit of the provider.
///
/// The images are directly converted to base64 strings. The maximum diff --git a/app/MindWork AI Studio/Components/AssistantPluginSecurityCard.razor b/app/MindWork AI Studio/Components/AssistantPluginSecurityCard.razor index d64f50bfb..9b1b49006 100644 --- a/app/MindWork AI Studio/Components/AssistantPluginSecurityCard.razor +++ b/app/MindWork AI Studio/Components/AssistantPluginSecurityCard.razor @@ -1,4 +1,4 @@ -@using AIStudio.Agents.AssistantAudit +@using AIStudio.AIOperations.PluginAudit @inherits MSGComponentBase @if (this.Plugin is not null) diff --git a/app/MindWork AI Studio/Components/ChatComponent.razor.cs b/app/MindWork AI Studio/Components/ChatComponent.razor.cs index 6a4a8e957..a7cb1f91b 100644 --- a/app/MindWork AI Studio/Components/ChatComponent.razor.cs +++ b/app/MindWork AI Studio/Components/ChatComponent.razor.cs @@ -1070,7 +1070,7 @@ public partial class ChatComponent : MSGComponentBase /// /// As with the tools, a template which carries no options says nothing and leaves the chat /// defaults in place. A template which carries them answers more than which sources to search: - /// whether data sources are used at all, and whether an agent picks them for each message. + /// whether data sources are used at all, and whether an AI operation picks them for each message. /// private DataSourceOptions GetAutomaticDataSourceOptions() => this.currentChatTemplate.DataSourceOptions?.CreateCopy() ?? this.SettingsManager.ConfigurationData.Chat.PreselectedDataSourceOptions.CreateCopy(); @@ -2355,7 +2355,7 @@ public partial class ChatComponent : MSGComponentBase await this.SyncWorkspaceHeaderWithChatThreadAsync(); await this.ChatThreadChanged.InvokeAsync(this.ChatThread); - // The new chat forgot which data sources an agent picked for the last request of the old one: + // The new chat forgot which data sources an AI operation picked for the last request of the old one: this.dataSourceSelectionComponent?.ChangeOptionWithoutSaving(continuation.DataSourceOptions, continuation.AISelectedDataSources); this.tokenTracker?.Nudge(); } diff --git a/app/MindWork AI Studio/Components/ConfigurationOption.razor b/app/MindWork AI Studio/Components/ConfigurationOption.razor index a2ad673ef..ee51cd0a2 100644 --- a/app/MindWork AI Studio/Components/ConfigurationOption.razor +++ b/app/MindWork AI Studio/Components/ConfigurationOption.razor @@ -1,5 +1,5 @@ @inherits ConfigurationBaseCore - + @(this.State() ? this.LabelOn : this.LabelOff) \ No newline at end of file diff --git a/app/MindWork AI Studio/Components/ConfigurationOption.razor.cs b/app/MindWork AI Studio/Components/ConfigurationOption.razor.cs index bbd0da1a2..878925652 100644 --- a/app/MindWork AI Studio/Components/ConfigurationOption.razor.cs +++ b/app/MindWork AI Studio/Components/ConfigurationOption.razor.cs @@ -30,7 +30,25 @@ public partial class ConfigurationOption : ConfigurationBaseCore ///
[Parameter] public Action StateUpdate { get; set; } = _ => { }; - + + /// + /// Asks before the option takes the new state, e.g., whether the user really wants to turn off a protection. + /// + /// + /// It gets the new state and returns false to keep the old one. + /// + [Parameter] + public Func> ConfirmChange { get; set; } = _ => Task.FromResult(true); + + /// + /// The key of the switch, which changes whenever a change was rejected. + /// + /// + /// The switch shows the state the user clicked, until its value changes. A rejected change leaves the value + /// as it was, so the switch is built anew to show it. + /// + private int switchKey; + #region Overrides of ConfigurationBase /// @@ -46,6 +64,12 @@ public partial class ConfigurationOption : ConfigurationBaseCore private async Task OptionChanged(bool updatedState) { + if (!await this.ConfirmChange(updatedState)) + { + this.switchKey++; + return; + } + this.StateUpdate(updatedState); await this.SettingsManager.StoreSettings(); await this.InformAboutChange(); diff --git a/app/MindWork AI Studio/Components/ConfigurationProviderSelection.razor.cs b/app/MindWork AI Studio/Components/ConfigurationProviderSelection.razor.cs index d4a452f8a..5c9c3f51b 100644 --- a/app/MindWork AI Studio/Components/ConfigurationProviderSelection.razor.cs +++ b/app/MindWork AI Studio/Components/ConfigurationProviderSelection.razor.cs @@ -49,13 +49,23 @@ public partial class ConfigurationProviderSelection : MSGComponentBase [Parameter] public string? NoPreselectionText { get; set; } + /// + /// The text of the empty entry, which says what happens without a preselected provider, or null for "Use app default". + /// + /// + /// Set it where the empty entry falls back on something else than the provider of the whole app, e.g., on the + /// model of the chat. + /// + [Parameter] + public string? EmptySelectionText { get; set; } + private IEnumerable> FilteredData() { if (this.NoPreselectionText is not null) yield return new(this.NoPreselectionText, AIStudio.Settings.Provider.NONE.Id); if(this.Component is not Tools.Components.NONE and not Tools.Components.APP_SETTINGS) - yield return new(T("Use app default"), string.Empty); + yield return new(this.EmptySelectionText ?? T("Use app default"), string.Empty); // // Filter the providers based on the minimum confidence level of this component, the enforced diff --git a/app/MindWork AI Studio/Components/DataSourceAgentSelected.cs b/app/MindWork AI Studio/Components/DataSourceAgentSelected.cs index 5108596bd..3acbf1d1d 100644 --- a/app/MindWork AI Studio/Components/DataSourceAgentSelected.cs +++ b/app/MindWork AI Studio/Components/DataSourceAgentSelected.cs @@ -1,4 +1,4 @@ -using AIStudio.Agents; +using AIStudio.AIOperations.DataSourceChoice; using AIStudio.Settings; namespace AIStudio.Components; diff --git a/app/MindWork AI Studio/Components/DataSourceSelection.razor b/app/MindWork AI Studio/Components/DataSourceSelection.razor index 4e06fa965..0cfc34e5e 100644 --- a/app/MindWork AI Studio/Components/DataSourceSelection.razor +++ b/app/MindWork AI Studio/Components/DataSourceSelection.razor @@ -75,7 +75,7 @@ } - @* With Semantic Search, no agent takes part: nothing would validate the retrieved data. *@ + @* With Semantic Search, no AI operation takes part: nothing would validate the retrieved data. *@ @if (this.AllowsAutomaticSelection && this.SettingsManager.ConfigurationData.AgentRetrievalContextValidation.EnableRetrievalContextValidation && !this.IsSemanticSearchEffective) { @@ -130,8 +130,8 @@ @* - With Semantic Search, no agent selects: the chat model picks with each search, and its - searches show in the answer. With classic RAG, there is something to show once the agent + With Semantic Search, no AI operation selects: the chat model picks with each search, and its + searches show in the answer. With classic RAG, there is something to show once the AI operation picked for a message. *@ @if (!this.IsSemanticSearchEffective && this.DataSourcesAISelected.Count > 0) diff --git a/app/MindWork AI Studio/Components/DataSourceSelection.razor.cs b/app/MindWork AI Studio/Components/DataSourceSelection.razor.cs index 93429ad51..2c8cc960a 100644 --- a/app/MindWork AI Studio/Components/DataSourceSelection.razor.cs +++ b/app/MindWork AI Studio/Components/DataSourceSelection.razor.cs @@ -313,7 +313,7 @@ public partial class DataSourceSelection : MSGComponentBase // that field holds what was usable the last time we looked, so a source filtered out once // would never come back, while the RAG process keeps reading it from the preselection. // - // How the chat searches decides whether the agents of the RAG process see the data, and + // How the chat searches decides whether the AI operations of the RAG process see the data, and // with that which data sources the provider of the chat may use at all. With several // models, all of them search the same way, and each must be allowed every data source: // diff --git a/app/MindWork AI Studio/Components/ReadWebContent.razor b/app/MindWork AI Studio/Components/ReadWebContent.razor index 1f1bfbe65..d93508696 100644 --- a/app/MindWork AI Studio/Components/ReadWebContent.razor +++ b/app/MindWork AI Studio/Components/ReadWebContent.razor @@ -3,7 +3,7 @@ @if (this.Preselect) { - + @if (this.ContentCleanerHint is { } contentCleanerHint) { diff --git a/app/MindWork AI Studio/Components/ReadWebContent.razor.cs b/app/MindWork AI Studio/Components/ReadWebContent.razor.cs index 87d0294f9..5151a3094 100644 --- a/app/MindWork AI Studio/Components/ReadWebContent.razor.cs +++ b/app/MindWork AI Studio/Components/ReadWebContent.razor.cs @@ -1,5 +1,7 @@ -using AIStudio.Agents; -using AIStudio.Chat; +using AIStudio.AIOperations; +using AIStudio.AIOperations.TextContentCleaning; +using AIStudio.Provider; +using AIStudio.Settings; using AIStudio.Tools.Security; using AIStudio.Tools.Web; @@ -25,7 +27,10 @@ public partial class ReadWebContent : MSGComponentBase private ILogger Logger { get; init; } = null!; [Inject] - private AgentTextContentCleaner AgentTextContentCleaner { get; init; } = null!; + private TextContentCleaningOperation TextContentCleaning { get; init; } = null!; + + [Inject] + private AIOperationProviderResolver ProviderResolver { get; init; } = null!; [Inject] private PromptInjectionGuardService PromptInjectionGuardService { get; init; } = null!; @@ -74,15 +79,15 @@ public partial class ReadWebContent : MSGComponentBase private ProcessStepValue processStep; /// - /// The model the content cleaner runs with. + /// The model the content cleaner would run with, and why others were not chosen. /// /// /// This is a resolved value, not a chosen one: the reader has no model selection of its own, - /// it takes what the assistant around it uses, unless a dedicated one for the cleaner or an - /// app-wide default takes precedence. Because the assistant's model can change at any moment, - /// this is resolved again on every render instead of being remembered from the first one. + /// it takes what the assistant around it uses, unless a dedicated one for the cleaner takes + /// precedence, or the app-wide default fills in. Because the assistant's model can change at any + /// moment, this is resolved again on every render instead of being remembered from the first one. /// - private AIStudio.Settings.Provider providerSettings = AIStudio.Settings.Provider.NONE; + private AIOperationProviderChoice cleanerChoice = new(AIStudio.Settings.Provider.NONE, AIOperationProviderIssue.NOT_SET, AIOperationProviderIssue.NOT_SET); #region Overrides of ComponentBase @@ -130,7 +135,24 @@ public partial class ReadWebContent : MSGComponentBase /// parameter, and a parameter arrives whenever the parent renders. Resolving only once would /// leave the cleaner with whatever was set the first time this component was built. /// - private void ResolveProvider() => this.providerSettings = this.SettingsManager.GetPreselectedProvider(Tools.Components.AGENT_TEXT_CONTENT_CLEANER, this.ProviderSettings.Id, true); + private void ResolveProvider() => this.cleanerChoice = this.ProviderResolver.Preview(TextContentCleaningOperation.GetProviderSettings(this.SettingsManager), ConfidenceLevel.NONE, GetCleanerProviderOptions(this.SettingsManager, this.ProviderSettings)); + + /// + /// What the reader adds to the choice of the provider for the content cleaner. + /// + /// + /// Without a model of its own, the cleaner falls back on the model of the assistant, and then on + /// the app-wide default. Its minimum confidence applies to both of them: a model somebody picked + /// for the assistant has to clear the bar of the cleaner before the cleaner uses it. + /// + /// The settings, for the app-wide default. + /// The model of the assistant around the reader. + /// The options for the provider resolver. + internal static AIOperationProviderOptions GetCleanerProviderOptions(SettingsManager settingsManager, AIStudio.Settings.Provider assistantProvider) => new() + { + FallbackProviderIds = [assistantProvider.Id, settingsManager.AppDefaultProviderId], + OwnMinimumConfidenceAppliesToFallbacks = true, + }; private async Task LoadFromWeb() { @@ -161,46 +183,36 @@ public partial class ReadWebContent : MSGComponentBase markdown = retrievedPage.ExtractedPage.Markdown; markdown = await this.PromptInjectionGuardService.SanitizeAsync(markdown, PromptInjectionSource.WebContent(this.URL)); - if (this.PreselectContentCleanerAgent && this.providerSettings == AIStudio.Settings.Provider.NONE) + if (this.PreselectContentCleanerAgent) { - // - // Say that the cleaning did not happen. The user asked for it, the page arrives, - // and without a word they would take the raw markdown -- navigation, cookie banner - // and advertising included -- for the cleaned result. - // - await this.MessageBus.SendError(new(AppIcons.AGENT, T("The content was loaded, but not cleaned: no model is available for the content cleaner."))); - } + var request = new TextContentCleaningRequest(markdown, this.URL); + var choice = this.ProviderResolver.Resolve(this.TextContentCleaning, request, TextContentCleaningOperation.GetProviderSettings(this.SettingsManager), GetCleanerProviderOptions(this.SettingsManager, this.ProviderSettings)); + if (!choice.HasProvider) + { + // + // Say that the cleaning did not happen. The user asked for it, the page arrives, + // and without a word they would take the raw markdown -- navigation, cookie banner + // and advertising included -- for the cleaned result. + // + await this.MessageBus.SendError(new(AppIcons.AI_OPERATION, T("The content was loaded, but not cleaned: no model is available for the content cleaner."))); + } + else + { + this.processStep = this.process[ReadWebContentSteps.CLEANING]; + this.AgentIsRunning = true; + await this.AgentIsRunningChanged.InvokeAsync(this.AgentIsRunning); + this.StateHasChanged(); - if (this.PreselectContentCleanerAgent && this.providerSettings != AIStudio.Settings.Provider.NONE) - { - this.AgentTextContentCleaner.ProviderSettings = this.providerSettings; - var additionalData = new Dictionary - { - { "sourceURL", this.URL }, - }; - - this.processStep = this.process[ReadWebContentSteps.CLEANING]; - this.AgentIsRunning = true; - await this.AgentIsRunningChanged.InvokeAsync(this.AgentIsRunning); - this.StateHasChanged(); - - var contentBlock = await this.AgentTextContentCleaner.ProcessInput(new ContentBlock - { - Time = DateTimeOffset.UtcNow, - ContentType = ContentType.TEXT, - Role = ChatRole.USER, - Content = new ContentText - { - Text = markdown, - }, - }, additionalData); - - markdown = contentBlock.Content is ContentText text ? text.Text : markdown; - - this.processStep = this.process[ReadWebContentSteps.DONE]; - this.AgentIsRunning = false; - await this.AgentIsRunningChanged.InvokeAsync(this.AgentIsRunning); - this.StateHasChanged(); + var result = await this.TextContentCleaning.RunAsync(request, new(choice.Provider)); + markdown = result.Markdown; + if (!result.IsCleaned) + await this.MessageBus.SendWarning(new(AppIcons.AI_OPERATION, T("The content was loaded, but not cleaned: the model of the content cleaner gave no answer."))); + + this.processStep = this.process[ReadWebContentSteps.DONE]; + this.AgentIsRunning = false; + await this.AgentIsRunningChanged.InvokeAsync(this.AgentIsRunning); + this.StateHasChanged(); + } } } catch (Exception exception) @@ -269,20 +281,24 @@ public partial class ReadWebContent : MSGComponentBase /// This is a hint, not a validation: the cleaner is an option of the reader, and an option /// nobody can use yet must not keep the assistant around it from running. It is also stated /// rather than remembered, so that choosing a model below makes it disappear at once. - /// The two causes lead to different places, which is why they are told apart: either no model - /// was chosen at all, or the chosen one is not trusted enough for this agent. + /// The causes lead to different places, which is why they are told apart: no model was chosen + /// at all, the organization does not allow the chosen one, or it is not trusted enough for the + /// cleaner. The reason comes from the choice itself, where the first named fallback is the model + /// of the assistant, or the app-wide default when the assistant has none. /// private string? ContentCleanerHint { get { - if(!this.PreselectContentCleanerAgent || this.providerSettings != AIStudio.Settings.Provider.NONE) + if(!this.PreselectContentCleanerAgent || this.cleanerChoice.HasProvider) return null; - if(this.ProviderSettings == AIStudio.Settings.Provider.NONE) - return TA("The content cleaner uses the model of this assistant. Please select one below."); - - return TA("The selected model does not meet the confidence requirements of the content cleaner. Please select another model, or configure an eligible one in the app settings."); + return this.cleanerChoice.FallbackIssue switch + { + AIOperationProviderIssue.NOT_SET => TA("The content cleaner uses the model of this assistant. Please select one below."), + AIOperationProviderIssue.PROHIBITED => TA("Your organization does not allow the selected model. Please select another model, or configure an eligible one in the app settings."), + _ => TA("The selected model does not meet the confidence requirements of the content cleaner. Please select another model, or configure an eligible one in the app settings."), + }; } } diff --git a/app/MindWork AI Studio/Components/Settings/SettingsPanelAgentAssistantAudit.razor b/app/MindWork AI Studio/Components/Settings/SettingsPanelAgentAssistantAudit.razor index 876ddbba3..19ea2446c 100644 --- a/app/MindWork AI Studio/Components/Settings/SettingsPanelAgentAssistantAudit.razor +++ b/app/MindWork AI Studio/Components/Settings/SettingsPanelAgentAssistantAudit.razor @@ -1,20 +1,25 @@ @using AIStudio.Settings @inherits SettingsPanelBase - + - @T("This Agent audits newly installed or updated external Plugin-Assistant for security risks before they are activated and stores the latest audit card until the plugin manifest changes.") + @T("Before external assistants are activated, a model audits newly installed or updated ones for security risks. AI Studio keeps the latest audit card until the plugin manifest changes.") - - - @(this.SettingsManager.ConfigurationData.AssistantPluginAudit.RequireAuditBeforeActivation ? T("External Assistants must be audited before activation") : T("External Assistant can be activated without an audit")) - - - - + + + + - + OptionHelp="@TA("The audit shows you all security risks and information. If you consider this rating false at your own discretion, you can decide to install it anyway (not recommended).")" IsLocked="() => ManagedConfiguration.TryGet(x => x.AssistantPluginAudit, x => x.BlockActivationBelowMinimum, out var meta) && meta.IsLocked"/> + + @if (this.IsAutomaticAuditWithoutProvider) + { + + + @TA("Automatic audits cannot run, because no model is available for security checks. Choose one above, or set an app-wide default provider in the app options.") + + + } diff --git a/app/MindWork AI Studio/Components/Settings/SettingsPanelAgentAssistantAudit.razor.cs b/app/MindWork AI Studio/Components/Settings/SettingsPanelAgentAssistantAudit.razor.cs index dd45a3cb1..af08ee527 100644 --- a/app/MindWork AI Studio/Components/Settings/SettingsPanelAgentAssistantAudit.razor.cs +++ b/app/MindWork AI Studio/Components/Settings/SettingsPanelAgentAssistantAudit.razor.cs @@ -1,37 +1,48 @@ using AIStudio.Dialogs; +using AIStudio.Tools.PluginSystem.Assistants; + +using Microsoft.AspNetCore.Components; + using DialogOptions = AIStudio.Dialogs.DialogOptions; namespace AIStudio.Components.Settings; public partial class SettingsPanelAgentAssistantAudit : SettingsPanelBase { - private async Task RequireAuditBeforeActivationChanged(bool updatedState) + [Inject] + private AssistantPluginAuditService AssistantPluginAuditService { get; init; } = null!; + + /// + /// Whether automatic audits are switched on, although no provider is left for them. + /// + /// + /// Without a provider, the automatic audit skips every plugin. The least any audit requires decides here: + /// should no provider meet it, none meets what a particular plugin requires either. + /// + private bool IsAutomaticAuditWithoutProvider => this.SettingsManager.ConfigurationData.AssistantPluginAudit.AutomaticallyAuditAssistants && !this.AssistantPluginAuditService.PreviewProvider().HasProvider; + /// + /// Asks the user before they turn off the audit before activation; turning it on needs no confirmation. + /// + /// The state the user chose. + /// True when the option may take the state. + private async Task ConfirmRequireAuditBeforeActivationChange(bool updatedState) { - if (!updatedState) + if (updatedState) + return true; + + var dialogParameters = new DialogParameters { - var dialogParameters = new DialogParameters { - { - x => x.Message, - this.TA("Disabling this setting turns off assistant plugin security audits. External assistants may then be activated and used even without a valid audit or after plugin changes. Do you really want to disable this protection?") - }, - }; + x => x.Message, + TA("Disabling this setting turns off assistant plugin security audits. External assistants may then be activated and used even without a valid audit or after plugin changes. Do you really want to disable this protection?") + }, + }; - var dialogReference = await this.DialogService.ShowAsync( - this.T("Disable Assistant Audit Protection"), - dialogParameters, - DialogOptions.FULLSCREEN); - var dialogResult = await dialogReference.Result; - if (dialogResult is null || dialogResult.Canceled) - { - await this.InvokeAsync(this.StateHasChanged); - return; - } - } - - this.SettingsManager.ConfigurationData.AssistantPluginAudit.RequireAuditBeforeActivation = updatedState; - await this.SettingsManager.StoreSettings(); - await this.SendMessage(Event.CONFIGURATION_CHANGED); - await this.InvokeAsync(this.StateHasChanged); + var dialogReference = await this.DialogService.ShowAsync( + T("Disable Assistant Audit Protection"), + dialogParameters, + DialogOptions.FULLSCREEN); + var dialogResult = await dialogReference.Result; + return dialogResult is { Canceled: false }; } -} +} \ No newline at end of file diff --git a/app/MindWork AI Studio/Components/Settings/SettingsPanelAgentContentCleaner.razor b/app/MindWork AI Studio/Components/Settings/SettingsPanelAgentContentCleaner.razor index 1ff60475e..68d155269 100644 --- a/app/MindWork AI Studio/Components/Settings/SettingsPanelAgentContentCleaner.razor +++ b/app/MindWork AI Studio/Components/Settings/SettingsPanelAgentContentCleaner.razor @@ -1,11 +1,13 @@ +@using AIStudio.Settings @inherits SettingsPanelBase - + - @T("Use Case: this agent is used to clean up text content. It extracts the main content, removes advertisements and other irrelevant things, and attempts to convert relative links into absolute links so that they can be used.") + @T("When an assistant loads content from the web, a model can clean it up: it extracts the main content, removes advertisements and other irrelevant things, and attempts to convert relative links into absolute links so that they can be used.") - - + + + \ No newline at end of file diff --git a/app/MindWork AI Studio/Components/Settings/SettingsPanelAgentDataSourceSelection.razor b/app/MindWork AI Studio/Components/Settings/SettingsPanelAgentDataSourceSelection.razor index 0bae021bd..949ccead2 100644 --- a/app/MindWork AI Studio/Components/Settings/SettingsPanelAgentDataSourceSelection.razor +++ b/app/MindWork AI Studio/Components/Settings/SettingsPanelAgentDataSourceSelection.razor @@ -1,12 +1,13 @@ @using AIStudio.Settings @inherits SettingsPanelBase - + - @T("Use Case: this agent is used to select the appropriate data sources for the current prompt.") + @T("In classic RAG, which searches the data sources with every message, a model first selects the data sources which fit the current prompt.") - - + + + \ No newline at end of file diff --git a/app/MindWork AI Studio/Components/Settings/SettingsPanelAgentRetrievalContextValidation.razor b/app/MindWork AI Studio/Components/Settings/SettingsPanelAgentRetrievalContextValidation.razor index d15c98cf2..e6cde249b 100644 --- a/app/MindWork AI Studio/Components/Settings/SettingsPanelAgentRetrievalContextValidation.razor +++ b/app/MindWork AI Studio/Components/Settings/SettingsPanelAgentRetrievalContextValidation.razor @@ -1,17 +1,18 @@ @using AIStudio.Settings @inherits SettingsPanelBase - + - @TA("Use Case: this agent is used to validate any retrieval context of any retrieval process. Perhaps there are many of these retrieval contexts and you want to validate them all. Therefore, you might want to use a cheap and fast LLM for this job. When using a local or self-hosted LLM, look for a small (e.g. 3B) and fast model.") + @TA("In classic RAG, a model checks each retrieval context, i.e., each passage found in the data sources, whether it fits the current prompt. There can be many of them, so you might want to use a cheap and fast model for this job. When using a local or self-hosted model, look for a small (e.g., 3B) and fast one.") - + @if (this.SettingsManager.ConfigurationData.AgentRetrievalContextValidation.EnableRetrievalContextValidation) { - - - + + + + } \ No newline at end of file diff --git a/app/MindWork AI Studio/Components/Settings/SettingsPanelApp.razor b/app/MindWork AI Studio/Components/Settings/SettingsPanelApp.razor index e3110450b..91be3e5bf 100644 --- a/app/MindWork AI Studio/Components/Settings/SettingsPanelApp.razor +++ b/app/MindWork AI Studio/Components/Settings/SettingsPanelApp.razor @@ -23,7 +23,7 @@ - + diff --git a/app/MindWork AI Studio/Dialogs/AssistantPluginAuditDialog.razor b/app/MindWork AI Studio/Dialogs/AssistantPluginAuditDialog.razor index 54299e68b..2065f46bc 100644 --- a/app/MindWork AI Studio/Dialogs/AssistantPluginAuditDialog.razor +++ b/app/MindWork AI Studio/Dialogs/AssistantPluginAuditDialog.razor @@ -1,4 +1,4 @@ -@using AIStudio.Agents.AssistantAudit +@using AIStudio.AIOperations.PluginAudit @inherits MSGComponentBase @@ -40,7 +40,7 @@ { - @TA("No model is set for security checks, neither for this agent nor for the app as a whole. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings.") + @this.ProviderSelectionHint @@ -210,7 +210,7 @@ @T("Audit Result") - @if (this.audit.Findings.Count == 0 && this.audit.Level is not AssistantAuditLevel.UNKNOWN) + @if (this.audit.Findings.Count == 0 && this.audit.Level is not PluginAuditLevel.UNKNOWN) { @T("Safe"): @T("No security issues were found during this check.") @@ -241,22 +241,22 @@ { var severityUi = finding.Severity switch { - AssistantAuditLevel.UNKNOWN => ( + PluginAuditLevel.UNKNOWN => ( AlertStyling: "color: rgb(12,128,223); background-color: rgba(33,150,243,0.06);", AlertIcon: AppIcons.UNKNOWN, ChipColor: Color.Info ), - AssistantAuditLevel.DANGEROUS => ( + PluginAuditLevel.DANGEROUS => ( AlertStyling: "color: rgb(242,28,13); background-color: rgba(244,67,54,0.06);", AlertIcon: AppIcons.SECURITY_DANGEROUS, ChipColor: Color.Error ), - AssistantAuditLevel.CAUTION => ( + PluginAuditLevel.CAUTION => ( AlertStyling: "color: rgb(214,129,0); background-color: rgba(255,152,0,0.06);", AlertIcon: AppIcons.WARNING, ChipColor: Color.Warning ), - AssistantAuditLevel.SAFE => ( + PluginAuditLevel.SAFE => ( AlertStyling: "color: rgb(0,163,68); background-color: rgba(0,200,83,0.06);", AlertIcon: AppIcons.AUDIT_SAFE, ChipColor: Color.Success diff --git a/app/MindWork AI Studio/Dialogs/AssistantPluginAuditDialog.razor.cs b/app/MindWork AI Studio/Dialogs/AssistantPluginAuditDialog.razor.cs index d3902e962..965b4bf6d 100644 --- a/app/MindWork AI Studio/Dialogs/AssistantPluginAuditDialog.razor.cs +++ b/app/MindWork AI Studio/Dialogs/AssistantPluginAuditDialog.razor.cs @@ -2,7 +2,8 @@ using System.Collections; using System.Collections.Immutable; using System.Globalization; using System.Reflection; -using AIStudio.Agents.AssistantAudit; +using AIStudio.AIOperations; +using AIStudio.AIOperations.PluginAudit; using AIStudio.Components; using AIStudio.Provider; using AIStudio.Settings.DataModel; @@ -26,6 +27,9 @@ public partial class AssistantPluginAuditDialog : MSGComponentBase [Inject] private IDialogService DialogService { get; init; } = null!; + [Inject] + private AIOperationProviderResolver ProviderResolver { get; init; } = null!; + [Parameter] public Guid PluginId { get; set; } private PluginAssistants? plugin; @@ -40,7 +44,7 @@ public partial class AssistantPluginAuditDialog : MSGComponentBase private PluginAssistantSecurityState securityState = new(); /// - /// The provider the user picks inside this dialog when nothing is configured for the audit agent. + /// The provider the user picks inside this dialog when nothing is configured for the audit. /// /// /// It lives and dies with this dialog and is never written to the settings: an audit is a one-off @@ -48,19 +52,34 @@ public partial class AssistantPluginAuditDialog : MSGComponentBase /// private AIStudio.Settings.Provider auditProviderSelection = AIStudio.Settings.Provider.NONE; - private AIStudio.Settings.Provider CurrentProvider => this.SettingsManager.GetPreselectedProvider(Tools.Components.AGENT_ASSISTANT_PLUGIN_AUDIT, null, true); + /// + /// The provider an audit would run with without a choice in this dialog, and why others were not chosen. + /// + private AIOperationProviderChoice ConfiguredChoice => this.ProviderResolver.Preview(PluginAuditOperation.GetProviderSettings(this.SettingsManager), ConfidenceLevel.NONE, AssistantPluginAuditService.GetProviderOptions(this.SettingsManager, null)); /// /// The provider this audit runs with: the configured one, or what the user picked here instead. /// - private AIStudio.Settings.Provider EffectiveProvider => this.CurrentProvider == AIStudio.Settings.Provider.NONE - ? this.auditProviderSelection - : this.CurrentProvider; + /// + /// Chosen as the audit service chooses, so that the dialog never names a provider the audit would refuse. + /// + private AIStudio.Settings.Provider EffectiveProvider => this.ProviderResolver.Preview(PluginAuditOperation.GetProviderSettings(this.SettingsManager), ConfidenceLevel.NONE, AssistantPluginAuditService.GetProviderOptions(this.SettingsManager, this.auditProviderSelection)).Provider; /// - /// Whether this dialog has to offer a provider, because neither the audit agent nor the app has one. + /// Whether this dialog has to offer a provider, because neither the audit nor the app has a usable one. /// - private bool NeedsProviderSelection => this.CurrentProvider == AIStudio.Settings.Provider.NONE; + private bool NeedsProviderSelection => !this.ConfiguredChoice.HasProvider; + + /// + /// Says why this dialog offers a provider: none is set, or the one set cannot be used. + /// + private string ProviderSelectionHint => AssistantPluginAuditService.GetRelevantIssue(this.ConfiguredChoice) switch + { + AIOperationProviderIssue.NOT_SET => TA("No model is set for security checks, neither for this AI task nor for the app as a whole. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings."), + AIOperationProviderIssue.MISSING => TA("The model set for security checks no longer exists. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings."), + AIOperationProviderIssue.PROHIBITED => TA("Your organization does not allow the model set for security checks. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings."), + _ => TA("The model set for security checks is not trusted enough for them. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings."), + }; private string ProviderLabel => this.EffectiveProvider == AIStudio.Settings.Provider.NONE ? T("No model configured") @@ -68,7 +87,7 @@ public partial class AssistantPluginAuditDialog : MSGComponentBase private DataAssistantPluginAudit AuditSettings => this.SettingsManager.ConfigurationData.AssistantPluginAudit; - private AssistantAuditLevel MinimumLevel => this.SettingsManager.ConfigurationData.AssistantPluginAudit.MinimumLevel; + private PluginAuditLevel MinimumLevel => this.SettingsManager.ConfigurationData.AssistantPluginAudit.MinimumLevel; private string MinimumLevelLabel => this.MinimumLevel.Name; @@ -87,7 +106,7 @@ public partial class AssistantPluginAuditDialog : MSGComponentBase /// audits. What the dialog shows the user still reads the raw result: a failed run is precisely /// what they need to see. /// - private PluginAssistantAudit? ConclusiveAudit => this.audit is { Level: not AssistantAuditLevel.UNKNOWN } ? this.audit : null; + private PluginAssistantAudit? ConclusiveAudit => this.audit is { Level: not PluginAuditLevel.UNKNOWN } ? this.audit : null; private bool IsAuditBelowMinimum => this.ConclusiveAudit is not null && this.ConclusiveAudit.Level < this.MinimumLevel; @@ -144,10 +163,10 @@ public partial class AssistantPluginAuditDialog : MSGComponentBase { // // The provider picked here is handed over as the fallback: the audit service uses it only - // when nothing is configured for the audit agent, so an organization-wide provider keeps + // when nothing is configured for the audit, so an organization-wide provider keeps // its precedence. // - this.audit = await this.AssistantPluginAuditService.RunAuditAsync(this.plugin, fallbackProvider: this.auditProviderSelection); + this.audit = await this.AssistantPluginAuditService.RunAuditAsync(this.plugin, providerAtHand: this.auditProviderSelection); this.securityState = PluginAssistantSecurityResolver.Resolve(this.SettingsManager, this.plugin); } finally @@ -212,9 +231,9 @@ public partial class AssistantPluginAuditDialog : MSGComponentBase private Severity GetAuditResultSeverity() => this.audit?.Level switch { - AssistantAuditLevel.DANGEROUS => Severity.Error, - AssistantAuditLevel.CAUTION => Severity.Warning, - AssistantAuditLevel.SAFE => Severity.Success, + PluginAuditLevel.DANGEROUS => Severity.Error, + PluginAuditLevel.CAUTION => Severity.Warning, + PluginAuditLevel.SAFE => Severity.Success, _ => Severity.Normal, }; diff --git a/app/MindWork AI Studio/Dialogs/AssistantPluginRevisionDialog.razor.cs b/app/MindWork AI Studio/Dialogs/AssistantPluginRevisionDialog.razor.cs index 94f84e1ca..91396e9f1 100644 --- a/app/MindWork AI Studio/Dialogs/AssistantPluginRevisionDialog.razor.cs +++ b/app/MindWork AI Studio/Dialogs/AssistantPluginRevisionDialog.razor.cs @@ -1,5 +1,5 @@ using System.Text; -using AIStudio.Agents.AssistantAudit; +using AIStudio.AIOperations.PluginAudit; using AIStudio.Components; using AIStudio.Provider; using AIStudio.Tools.PluginSystem; @@ -200,11 +200,11 @@ public partial class AssistantPluginRevisionDialog : MSGComponentBase { // // The provider the user picked for the revision serves as the fallback: it is used only - // when nothing is configured for the audit agent, and only when it is trusted enough for + // when nothing is configured for the audit, and only when it is trusted enough for // an audit. Without it, a revised plugin could not be checked at all here. // - var audit = await this.AssistantPluginAuditService.RunAuditAsync(updatedPlugin, fallbackProvider: this.providerSettings); - if (audit.Level is AssistantAuditLevel.UNKNOWN) + var audit = await this.AssistantPluginAuditService.RunAuditAsync(updatedPlugin, providerAtHand: this.providerSettings); + if (audit.Level is PluginAuditLevel.UNKNOWN) return audit; UpsertAudit(this.SettingsManager.ConfigurationData.AssistantPluginAudits, audit); diff --git a/app/MindWork AI Studio/Dialogs/DirectChatLauncherSettingsDialog.razor.cs b/app/MindWork AI Studio/Dialogs/DirectChatLauncherSettingsDialog.razor.cs index 36018117a..9bb77a090 100644 --- a/app/MindWork AI Studio/Dialogs/DirectChatLauncherSettingsDialog.razor.cs +++ b/app/MindWork AI Studio/Dialogs/DirectChatLauncherSettingsDialog.razor.cs @@ -1,5 +1,5 @@ using System.Text; -using AIStudio.Agents.AssistantAudit; +using AIStudio.AIOperations.PluginAudit; using AIStudio.Components; using AIStudio.Tools.PluginSystem; using AIStudio.Tools.PluginSystem.Assistants; @@ -231,7 +231,7 @@ public partial class DirectChatLauncherSettingsDialog : MSGComponentBase try { var audit = await this.AssistantPluginAuditService.RunAuditAsync(updatedPlugin); - if (audit.Level is AssistantAuditLevel.UNKNOWN) + if (audit.Level is PluginAuditLevel.UNKNOWN) return audit; UpsertAudit(this.SettingsManager.ConfigurationData.AssistantPluginAudits, audit); diff --git a/app/MindWork AI Studio/Dialogs/Settings/SettingsDialogLegalCheck.razor b/app/MindWork AI Studio/Dialogs/Settings/SettingsDialogLegalCheck.razor index 4c0a157a1..ccd62e32d 100644 --- a/app/MindWork AI Studio/Dialogs/Settings/SettingsDialogLegalCheck.razor +++ b/app/MindWork AI Studio/Dialogs/Settings/SettingsDialogLegalCheck.razor @@ -12,7 +12,7 @@ - + diff --git a/app/MindWork AI Studio/Dialogs/Settings/SettingsDialogSWOTAnalysis.razor b/app/MindWork AI Studio/Dialogs/Settings/SettingsDialogSWOTAnalysis.razor index b1ac73ed3..eb7f6176d 100644 --- a/app/MindWork AI Studio/Dialogs/Settings/SettingsDialogSWOTAnalysis.razor +++ b/app/MindWork AI Studio/Dialogs/Settings/SettingsDialogSWOTAnalysis.razor @@ -13,7 +13,7 @@ - + @if (this.SettingsManager.ConfigurationData.SWOTAnalysis.PreselectedTargetLanguage is CommonLanguages.OTHER) { diff --git a/app/MindWork AI Studio/Dialogs/Settings/SettingsDialogTextSummarizer.razor b/app/MindWork AI Studio/Dialogs/Settings/SettingsDialogTextSummarizer.razor index 9344f0f11..1b6cde934 100644 --- a/app/MindWork AI Studio/Dialogs/Settings/SettingsDialogTextSummarizer.razor +++ b/app/MindWork AI Studio/Dialogs/Settings/SettingsDialogTextSummarizer.razor @@ -14,7 +14,7 @@ - + @if (this.SettingsManager.ConfigurationData.TextSummarizer.PreselectedTargetLanguage is CommonLanguages.OTHER) { diff --git a/app/MindWork AI Studio/Dialogs/Settings/SettingsDialogTranslation.razor b/app/MindWork AI Studio/Dialogs/Settings/SettingsDialogTranslation.razor index 693438703..b9c842f80 100644 --- a/app/MindWork AI Studio/Dialogs/Settings/SettingsDialogTranslation.razor +++ b/app/MindWork AI Studio/Dialogs/Settings/SettingsDialogTranslation.razor @@ -13,7 +13,7 @@ - + @if (this.SettingsManager.ConfigurationData.Translation.PreselectedTargetLanguage is CommonLanguages.OTHER) diff --git a/app/MindWork AI Studio/Pages/Assistants.razor.cs b/app/MindWork AI Studio/Pages/Assistants.razor.cs index 6c7a4757a..2cda504e3 100644 --- a/app/MindWork AI Studio/Pages/Assistants.razor.cs +++ b/app/MindWork AI Studio/Pages/Assistants.razor.cs @@ -1,5 +1,4 @@ using AIStudio.Components; -using AIStudio.Agents.AssistantAudit; using AIStudio.Dialogs.Settings; using AIStudio.Tools.PluginSystem; using AIStudio.Tools.PluginSystem.Assistants; @@ -96,28 +95,13 @@ public partial class Assistants : MSGComponentBase try { - var wasConfigurationChanged = false; - var assistantPlugins = PluginFactory.RunningPlugins.OfType().ToList(); - foreach (var assistantPlugin in assistantPlugins) - { - var securityState = PluginAssistantSecurityResolver.Resolve(this.SettingsManager, assistantPlugin); - if (!securityState.RequiresAudit) - continue; - - var audit = await this.AssistantPluginAuditService.RunAuditAsync(assistantPlugin); - if (audit.Level is AssistantAuditLevel.UNKNOWN) - { - await MessageBus.INSTANCE.SendError(new (AppIcons.AGENT, string.Format(this.TA("The automatic security audit for the assistant plugin '{0}' failed. Please run it manually from the plugins page."), assistantPlugin.Name))); - continue; - } - - this.UpsertAuditCard(audit); - wasConfigurationChanged = true; - } - - if (!wasConfigurationChanged) + var audits = await this.AssistantPluginAuditService.RunAutomaticAuditsAsync(); + if (audits.Count == 0) return; + foreach (var audit in audits) + this.UpsertAuditCard(audit); + await this.SettingsManager.StoreSettings(); await this.MessageBus.SendMessage(this, Event.CONFIGURATION_CHANGED); } diff --git a/app/MindWork AI Studio/Pages/Plugins.razor.cs b/app/MindWork AI Studio/Pages/Plugins.razor.cs index 4fe92ffd2..7d1217ca9 100644 --- a/app/MindWork AI Studio/Pages/Plugins.razor.cs +++ b/app/MindWork AI Studio/Pages/Plugins.razor.cs @@ -1,5 +1,5 @@ using AIStudio.Components; -using AIStudio.Agents.AssistantAudit; +using AIStudio.AIOperations.PluginAudit; using AIStudio.Dialogs; using AIStudio.Settings.DataModel; using AIStudio.Tools.PluginSystem.Assistants; @@ -152,7 +152,7 @@ public partial class Plugins : MSGComponentBase await this.MessageBus.SendMessage(this, Event.CONFIGURATION_CHANGED); } - private async Task ConfirmActivationBelowMinimumAsync(string pluginName, AssistantAuditLevel actualLevel) + private async Task ConfirmActivationBelowMinimumAsync(string pluginName, PluginAuditLevel actualLevel) { var dialogParameters = new DialogParameters { @@ -570,28 +570,13 @@ public partial class Plugins : MSGComponentBase try { - var wasConfigurationChanged = false; - var assistantPlugins = PluginFactory.RunningPlugins.OfType().ToList(); - foreach (var assistantPlugin in assistantPlugins) - { - var securityState = PluginAssistantSecurityResolver.Resolve(this.SettingsManager, assistantPlugin); - if (!securityState.RequiresAudit) - continue; - - var audit = await this.AssistantPluginAuditService.RunAuditAsync(assistantPlugin); - if (audit.Level is AssistantAuditLevel.UNKNOWN) - { - await MessageBus.INSTANCE.SendError(new (AppIcons.AGENT, string.Format(this.TA("The automatic security audit for the assistant plugin '{0}' failed. Please run it manually."), assistantPlugin.Name))); - continue; - } - - this.UpsertAuditCard(audit); - wasConfigurationChanged = true; - } - - if (!wasConfigurationChanged) + var audits = await this.AssistantPluginAuditService.RunAutomaticAuditsAsync(); + if (audits.Count == 0) return; + foreach (var audit in audits) + this.UpsertAuditCard(audit); + await this.SettingsManager.StoreSettings(); await this.MessageBus.SendMessage(this, Event.CONFIGURATION_CHANGED); } diff --git a/app/MindWork AI Studio/Plugins/configuration/plugin.lua b/app/MindWork AI Studio/Plugins/configuration/plugin.lua index 98a581a6c..9b06d5985 100644 --- a/app/MindWork AI Studio/Plugins/configuration/plugin.lua +++ b/app/MindWork AI Studio/Plugins/configuration/plugin.lua @@ -646,15 +646,15 @@ CONFIG["SETTINGS"] = {} -- call tools, neither the tools nor semantic_search may be switched off, and the provider has -- to meet a minimum confidence you set for semantic_search, see DataTools. Otherwise, AI Studio -- searches with every message instead. --- With SEMANTIC_SEARCH, no agent takes part: DataChat.PreselectedDataSourcesAutomaticSelection +-- With SEMANTIC_SEARCH, no AI task takes part: DataChat.PreselectedDataSourcesAutomaticSelection -- then lets the AI itself choose among all data sources it may use, and -- DataChat.PreselectedDataSourcesAutomaticValidation has no effect. -- CONFIG["SETTINGS"]["DataChat.PreselectedDataSourcesRetrievalMode"] = "EVERY_MESSAGE" --- Controls whether AI Studio asks an agent to choose data sources: +-- Controls whether an AI task chooses the data sources: -- CONFIG["SETTINGS"]["DataChat.PreselectedDataSourcesAutomaticSelection"] = true --- Controls whether retrieved data is validated by an agent: +-- Controls whether an AI task validates the retrieved data: -- CONFIG["SETTINGS"]["DataChat.PreselectedDataSourcesAutomaticValidation"] = true -- Must contain IDs from CONFIG["DATA_SOURCES"] or user-configured data sources. @@ -1605,27 +1605,56 @@ CONFIG["SETTINGS"] = {} -- CONFIG["SETTINGS"]["DataDataSourceIndexing.MinimumPauseBetweenStepsSeconds.AllowUserOverride"] = true -- CONFIG["SETTINGS"]["DataDataSourceIndexing.MaximumPauseBetweenStepsSeconds.AllowUserOverride"] = true --- Configure the data source selection agent. --- This agent is used when chat data source options enable AI-based data source selection. --- The provider must be one of the provider IDs defined in CONFIG["LLM_PROVIDERS"]. +-- Configure the text content cleaner, an AI task. +-- It removes navigation, advertisements, and other clutter from web pages which an assistant reads. +-- The provider must be one of the provider IDs defined in CONFIG["LLM_PROVIDERS"]. Without one, the +-- cleaner uses the provider of the assistant, and otherwise the app-wide default provider. +-- The minimum confidence applies to every provider the cleaner uses, the provider of the assistant +-- and the app-wide default included. The provider and the minimum confidence apply only while +-- PreselectAgentOptions is true. +-- Allowed confidence values are: NONE, UNTRUSTED, UNKNOWN, VERY_LOW, LOW, MODERATE, MEDIUM, HIGH +-- CONFIG["SETTINGS"]["DataTextContentCleaner.PreselectAgentOptions"] = true +-- CONFIG["SETTINGS"]["DataTextContentCleaner.PreselectedAgentProvider"] = "00000000-0000-0000-0000-000000000000" +-- CONFIG["SETTINGS"]["DataTextContentCleaner.MinimumProviderConfidence"] = "NONE" +-- CONFIG["SETTINGS"]["DataTextContentCleaner.PreselectAgentOptions.AllowUserOverride"] = true +-- CONFIG["SETTINGS"]["DataTextContentCleaner.PreselectedAgentProvider.AllowUserOverride"] = true +-- CONFIG["SETTINGS"]["DataTextContentCleaner.MinimumProviderConfidence.AllowUserOverride"] = true + +-- Configure the data source selection, an AI task. +-- It runs when chat data source options enable AI-based data source selection. +-- The provider must be one of the provider IDs defined in CONFIG["LLM_PROVIDERS"]. Without one, the +-- AI task uses the provider of the chat, and otherwise the app-wide default provider. +-- The minimum confidence applies to every provider the AI task uses, the provider of the chat and the +-- app-wide default included. The provider and the minimum confidence apply only while +-- PreselectAgentOptions is true. +-- Allowed confidence values are: NONE, UNTRUSTED, UNKNOWN, VERY_LOW, LOW, MODERATE, MEDIUM, HIGH -- CONFIG["SETTINGS"]["DataAgentDataSourceSelection.PreselectAgentOptions"] = true -- CONFIG["SETTINGS"]["DataAgentDataSourceSelection.PreselectedAgentProvider"] = "00000000-0000-0000-0000-000000000000" +-- CONFIG["SETTINGS"]["DataAgentDataSourceSelection.MinimumProviderConfidence"] = "NONE" -- CONFIG["SETTINGS"]["DataAgentDataSourceSelection.PreselectAgentOptions.AllowUserOverride"] = true -- CONFIG["SETTINGS"]["DataAgentDataSourceSelection.PreselectedAgentProvider.AllowUserOverride"] = true +-- CONFIG["SETTINGS"]["DataAgentDataSourceSelection.MinimumProviderConfidence.AllowUserOverride"] = true --- Configure the retrieval context validation agent. --- This agent is used when retrieval context validation is enabled globally and chat data source options enable AI-based validation. --- The provider must be one of the provider IDs defined in CONFIG["LLM_PROVIDERS"]. +-- Configure the retrieval context validation, an AI task. +-- It runs when retrieval context validation is enabled globally and chat data source options enable AI-based validation. +-- The provider must be one of the provider IDs defined in CONFIG["LLM_PROVIDERS"]. Without one, the +-- AI task uses the provider of the chat, and otherwise the app-wide default provider. +-- The minimum confidence applies to every provider the AI task uses, the provider of the chat and the +-- app-wide default included. The provider and the minimum confidence apply only while +-- PreselectAgentOptions is true. +-- Allowed confidence values are: NONE, UNTRUSTED, UNKNOWN, VERY_LOW, LOW, MODERATE, MEDIUM, HIGH -- CONFIG["SETTINGS"]["DataAgentRetrievalContextValidation.EnableRetrievalContextValidation"] = true -- CONFIG["SETTINGS"]["DataAgentRetrievalContextValidation.PreselectAgentOptions"] = true -- CONFIG["SETTINGS"]["DataAgentRetrievalContextValidation.PreselectedAgentProvider"] = "00000000-0000-0000-0000-000000000000" +-- CONFIG["SETTINGS"]["DataAgentRetrievalContextValidation.MinimumProviderConfidence"] = "NONE" -- CONFIG["SETTINGS"]["DataAgentRetrievalContextValidation.NumParallelValidations"] = 3 -- CONFIG["SETTINGS"]["DataAgentRetrievalContextValidation.EnableRetrievalContextValidation.AllowUserOverride"] = true -- CONFIG["SETTINGS"]["DataAgentRetrievalContextValidation.PreselectAgentOptions.AllowUserOverride"] = true -- CONFIG["SETTINGS"]["DataAgentRetrievalContextValidation.PreselectedAgentProvider.AllowUserOverride"] = true +-- CONFIG["SETTINGS"]["DataAgentRetrievalContextValidation.MinimumProviderConfidence.AllowUserOverride"] = true -- CONFIG["SETTINGS"]["DataAgentRetrievalContextValidation.NumParallelValidations.AllowUserOverride"] = true --- Configure assistant plugin security audits. +-- Configure the security audit of assistant plugins, an AI task. -- -- Configure whether assistant plugins must be audited before users can activate them. -- CONFIG["SETTINGS"]["DataAssistantPluginAudit.RequireAuditBeforeActivation"] = true @@ -1635,6 +1664,11 @@ CONFIG["SETTINGS"] = {} -- Without a selected audit provider, AI Studio uses the app-wide default provider. -- CONFIG["SETTINGS"]["DataAssistantPluginAudit.PreselectedAgentProvider"] = "00000000-0000-0000-0000-000000000000" -- +-- Configure the minimum confidence of the provider which audits a plugin. It applies to every +-- provider an audit uses, the app-wide default and the one picked in the audit dialog included. +-- Allowed confidence values are: NONE, UNTRUSTED, UNKNOWN, VERY_LOW, LOW, MODERATE, MEDIUM, HIGH +-- CONFIG["SETTINGS"]["DataAssistantPluginAudit.MinimumProviderConfidence"] = "NONE" +-- -- Configure the minimum audit level assistant plugins must meet. -- Allowed values are: UNKNOWN, DANGEROUS, CAUTION, SAFE -- CONFIG["SETTINGS"]["DataAssistantPluginAudit.MinimumLevel"] = "CAUTION" @@ -1643,11 +1677,14 @@ CONFIG["SETTINGS"] = {} -- CONFIG["SETTINGS"]["DataAssistantPluginAudit.BlockActivationBelowMinimum"] = true -- -- Configure whether new or changed assistant plugins are audited automatically in the background. +-- Automatic audits need a provider: the dedicated audit provider or the app-wide default. Without +-- one, AI Studio skips them and tells the user once. -- CONFIG["SETTINGS"]["DataAssistantPluginAudit.AutomaticallyAuditAssistants"] = false -- -- Configure whether users can change assistant plugin audit settings locally. -- CONFIG["SETTINGS"]["DataAssistantPluginAudit.RequireAuditBeforeActivation.AllowUserOverride"] = false -- CONFIG["SETTINGS"]["DataAssistantPluginAudit.PreselectedAgentProvider.AllowUserOverride"] = false +-- CONFIG["SETTINGS"]["DataAssistantPluginAudit.MinimumProviderConfidence.AllowUserOverride"] = false -- CONFIG["SETTINGS"]["DataAssistantPluginAudit.MinimumLevel.AllowUserOverride"] = false -- CONFIG["SETTINGS"]["DataAssistantPluginAudit.BlockActivationBelowMinimum.AllowUserOverride"] = false -- CONFIG["SETTINGS"]["DataAssistantPluginAudit.AutomaticallyAuditAssistants.AllowUserOverride"] = false @@ -1744,16 +1781,16 @@ CONFIG["CHAT_TEMPLATES"] = {} -- -- How the data sources are searched, with the same values and the same fallback -- -- as DataChat.PreselectedDataSourcesRetrievalMode: SEMANTIC_SEARCH lets the AI -- -- search them itself whenever a question calls for it, EVERY_MESSAGE lets AI Studio --- -- search them with every message. With SEMANTIC_SEARCH, no agent takes part: +-- -- search them with every message. With SEMANTIC_SEARCH, no AI task takes part: -- -- AutomaticDataSourceSelection then lets the AI itself choose among all data -- -- sources it may use, and AutomaticValidation has no effect. -- ["RetrievalMode"] = "EVERY_MESSAGE", -- --- -- Let an agent choose the fitting data sources for each question. When true, +-- -- Let an AI task choose the fitting data sources for each question. When true, -- -- PreselectedDataSourceIds is not used. -- ["AutomaticDataSourceSelection"] = false, -- --- -- Let an agent check whether the retrieved data fits the question. +-- -- Let an AI task check whether the retrieved data fits the question. -- ["AutomaticValidation"] = true, -- -- -- Must contain IDs from CONFIG["DATA_SOURCES"] or user-configured data sources. diff --git a/app/MindWork AI Studio/Plugins/languages/de-de-43065dbc-78d0-45b7-92be-f14c2926e2dc/plugin.lua b/app/MindWork AI Studio/Plugins/languages/de-de-43065dbc-78d0-45b7-92be-f14c2926e2dc/plugin.lua index 514ebaf77..8e9a4c6ce 100644 --- a/app/MindWork AI Studio/Plugins/languages/de-de-43065dbc-78d0-45b7-92be-f14c2926e2dc/plugin.lua +++ b/app/MindWork AI Studio/Plugins/languages/de-de-43065dbc-78d0-45b7-92be-f14c2926e2dc/plugin.lua @@ -48,47 +48,32 @@ LANG_NAME = "Deutsch (Deutschland)" UI_TEXT_CONTENT = {} --- No audit provider is configured. -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITAGENT::T2034826200"] = "Es ist kein Audit-Anbieter konfiguriert." - --- The security check could not be completed because the LLM's response was unusable. The audit level remains Unknown, so please try again later. -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITAGENT::T2451573087"] = "Die Sicherheitsprüfung konnte nicht abgeschlossen werden, da die Antwort des LLM unbrauchbar war. Die Audit-Stufe bleibt „Unbekannt“, bitte versuchen Sie es später erneut." - --- The security check could not be completed because the LLM's response was unusable. The audit level remains Unknown, so please try again later. -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITAGENT::T2451573087::INFORMAL"] = "Die Sicherheitsprüfung konnte nicht abgeschlossen werden, da die Antwort des LLM unbrauchbar war. Die Audit-Stufe bleibt „Unbekannt“, bitte versuche es später erneut." - --- The provider is not trusted enough for security checks. -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITAGENT::T2861409367"] = "Der Anbieter ist für Sicherheitsprüfungen nicht vertrauenswürdig genug." - --- The audit agent did not return a usable response. -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITAGENT::T3310188890"] = "Der Audit-Agent hat keine verwendbare Antwort zurückgegeben." - --- No provider is configured for the Security Audit Agent. -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITAGENT::T3605554201"] = "Für den Sicherheitsprüfungs-Agenten ist kein Anbieter konfiguriert." - --- The selected provider is not trusted enough for security checks. Pick one which meets the confidence required here, or choose a dedicated provider for security checks in the app settings. -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITAGENT::T4104574219"] = "Der ausgewählte Anbieter ist für Sicherheitsprüfungen nicht vertrauenswürdig genug. Wählen Sie einen Anbieter aus, der das hier erforderliche Vertrauensniveau erfüllt, oder legen Sie in den App-Einstellungen einen speziellen Anbieter für Audits fest." - --- The selected provider is not trusted enough for security checks. Pick one which meets the confidence required here, or choose a dedicated provider for security checks in the app settings. -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITAGENT::T4104574219::INFORMAL"] = "Der ausgewählte Anbieter ist für Sicherheitsprüfungen nicht vertrauenswürdig genug. Wähle einen Anbieter aus, der das hier erforderliche Vertrauensniveau erfüllt, oder lege in den App-Einstellungen einen speziellen Anbieter für Audits fest." - --- The audit result was empty. -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITAGENT::T432419958"] = "Das Prüfergebnis war leer." - --- The audit agent returned invalid JSON. -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITAGENT::T917600186"] = "Der Audit-Agent hat ungültiges JSON zurückgegeben." - -- Concerning -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITLEVELEXTENSIONS::T1500095429"] = "Bedenklich" +UI_TEXT_CONTENT["AISTUDIO::AIOPERATIONS::PLUGINAUDIT::PLUGINAUDITLEVELEXTENSIONS::T1500095429"] = "Bedenklich" -- Dangerous -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITLEVELEXTENSIONS::T3421510547"] = "Gefährlich" +UI_TEXT_CONTENT["AISTUDIO::AIOPERATIONS::PLUGINAUDIT::PLUGINAUDITLEVELEXTENSIONS::T3421510547"] = "Gefährlich" -- Unknown -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITLEVELEXTENSIONS::T3424652889"] = "Unbekannt" +UI_TEXT_CONTENT["AISTUDIO::AIOPERATIONS::PLUGINAUDIT::PLUGINAUDITLEVELEXTENSIONS::T3424652889"] = "Unbekannt" -- Safe -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITLEVELEXTENSIONS::T760494712"] = "Sicher" +UI_TEXT_CONTENT["AISTUDIO::AIOPERATIONS::PLUGINAUDIT::PLUGINAUDITLEVELEXTENSIONS::T760494712"] = "Sicher" + +-- The security check could not be completed because the LLM's response was unusable. The audit level remains Unknown, so please try again later. +UI_TEXT_CONTENT["AISTUDIO::AIOPERATIONS::PLUGINAUDIT::PLUGINAUDITOPERATION::T2451573087"] = "Die Sicherheitsprüfung konnte nicht abgeschlossen werden, da die Antwort des LLM unbrauchbar war. Die Audit-Stufe bleibt „Unbekannt“. Bitte versuchen Sie es später erneut." + +-- The security check could not be completed because the LLM's response was unusable. The audit level remains Unknown, so please try again later. +UI_TEXT_CONTENT["AISTUDIO::AIOPERATIONS::PLUGINAUDIT::PLUGINAUDITOPERATION::T2451573087::INFORMAL"] = "Die Sicherheitsprüfung konnte nicht abgeschlossen werden, da die Antwort des LLM unbrauchbar war. Die Audit-Stufe bleibt „Unbekannt“. Bitte versuche es später erneut." + +-- The audit did not return a usable response. +UI_TEXT_CONTENT["AISTUDIO::AIOPERATIONS::PLUGINAUDIT::PLUGINAUDITOPERATION::T391654503"] = "Die Prüfung hat keine brauchbare Antwort geliefert." + +-- The audit result was empty. +UI_TEXT_CONTENT["AISTUDIO::AIOPERATIONS::PLUGINAUDIT::PLUGINAUDITOPERATION::T432419958"] = "Das Prüfergebnis war leer." + +-- The audit returned invalid JSON. +UI_TEXT_CONTENT["AISTUDIO::AIOPERATIONS::PLUGINAUDIT::PLUGINAUDITOPERATION::T678594297"] = "Die Prüfung hat ungültiges JSON zurückgegeben." -- Objective UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::AGENDA::ASSISTANTAGENDA::T1121586136"] = "Zielsetzung" @@ -10254,8 +10239,8 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T1160768613"] = "Der Agen -- The content cleaner uses the model of this assistant. Please select one below. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T1160768613::INFORMAL"] = "Der Agent zur Inhaltsbereinigung verwendet das Modell dieses Assistenten. Bitte wähle unten eines aus." --- The content is cleaned using an LLM agent: the main content is extracted, advertisements and other irrelevant things are attempted to be removed; relative links are attempted to be converted into absolute links so that they can be used. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T1164201762"] = "Der Inhalt wird mithilfe eines LLM-Agenten bereinigt: Der Hauptinhalt wird extrahiert, Werbung und andere irrelevante Elemente werden nach Möglichkeit entfernt. Relative Links werden nach Möglichkeit in absolute Links umgewandelt, damit sie verwendet werden können." +-- The content was loaded, but not cleaned: the model of the content cleaner gave no answer. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T1189712796"] = "Der Inhalt wurde geladen, aber nicht bereinigt: Das Modell der Inhaltsbereinigung hat keine Antwort gegeben." -- Fetch UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T1396322691"] = "Abrufen" @@ -10266,12 +10251,21 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T2235427807"] = "Bitte ge -- Please provide a URL to load the content from. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T2235427807::INFORMAL"] = "Bitte gib eine URL an, von der der Inhalt geladen werden soll." +-- Your organization does not allow the selected model. Please select another model, or configure an eligible one in the app settings. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T2247340324"] = "Ihre Organisation erlaubt das ausgewählte Modell nicht. Bitte wählen Sie ein anderes Modell aus oder konfigurieren Sie in den App-Einstellungen ein zugelassenes Modell." + +-- Your organization does not allow the selected model. Please select another model, or configure an eligible one in the app settings. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T2247340324::INFORMAL"] = "Deine Organisation erlaubt das ausgewählte Modell nicht. Bitte wähle ein anderes Modell aus oder konfiguriere in den App-Einstellungen ein zugelassenes Modell." + -- Loads the content from your URL. Does not work when the content is hidden behind a paywall. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T2672192696"] = "Lädt den Inhalt von der übergebenen URL. Funktioniert nicht, wenn der Inhalt hinter einer Paywall verborgen ist." -- Loads the content from your URL. Does not work when the content is hidden behind a paywall. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T2672192696::INFORMAL"] = "Lädt den Inhalt von der übergebenen URL. Funktioniert nicht, wenn der Inhalt hinter einer Paywall verborgen ist." +-- The text content cleaner, an AI task, extracts the main content, tries to remove advertisements and other clutter, and tries to turn relative links into absolute ones, so that they work. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T2765793850"] = "Die Inhaltsbereinigung, eine KI-Aufgabe, extrahiert den Hauptinhalt und versucht, Werbung und andere störende Elemente zu entfernen sowie relative Links in absolute umzuwandeln, damit sie funktionieren." + -- URL from which to load the content UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T2883163022"] = "URL, von der der Inhalt geladen werden soll" @@ -10290,6 +10284,9 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T307442288"] = "Bitte geb -- Please provide a valid HTTP or HTTPS URL. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T307442288::INFORMAL"] = "Bitte gib eine gültige HTTP- oder HTTPS-URL ein." +-- Clean up the content with AI? +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T3375295820"] = "Inhalte mit KI bereinigen?" + -- No content cleaning UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T3588401674"] = "Keine Inhaltsbereinigung" @@ -10299,9 +10296,6 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T3825586228"] = "Bitte ge -- Please provide a valid URL. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T3825586228::INFORMAL"] = "Bitte gib eine gültige URL ein." --- Clean up content by using an LLM agent? -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T4057255553"] = "Inhalte mit einem LLM-Agenten bereinigen?" - -- Show web content options UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T4249712357"] = "Optionen für Webinhalte anzeigen" @@ -10353,6 +10347,12 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SELECTFILE::T4285779702"] = "Datei auswä -- External Assistants rated below this audit level are treated as insufficiently reviewed. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T1162151451"] = "Externe Assistenten, die unterhalb dieser Audit-Stufe bewertet werden, gelten als nicht ausreichend geprüft." +-- Optionally choose a dedicated provider for assistant plugin audits. When left empty, AI Studio uses the app-wide default provider, or else the model you choose when auditing. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T1707650617"] = "Optional können Sie einen eigenen Anbieter für die Prüfung von Assistenten-Plugins auswählen. Bleibt das Feld leer, verwendet AI Studio den appweiten Standardanbieter und sonst das Modell, das Sie bei der Prüfung auswählen." + +-- Optionally choose a dedicated provider for assistant plugin audits. When left empty, AI Studio uses the app-wide default provider, or else the model you choose when auditing. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T1707650617::INFORMAL"] = "Optional kannst du einen eigenen Anbieter für die Prüfung von Assistenten-Plugins auswählen. Bleibt das Feld leer, verwendet AI Studio den appweiten Standardanbieter und sonst das Modell, das du bei der Prüfung auswählst." + -- Users may still activate plugins below the minimum Audit-Level UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T1840342259"] = "Nutzer können Assistenten unterhalb der Mindest-Audit-Stufe weiterhin aktivieren." @@ -10365,6 +10365,12 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDI -- External Assistants must be audited before activation UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T2065972970"] = "Externe Assistenten müssen vor der Aktivierung geprüft werden." +-- Before external assistants are activated, a model audits newly installed or updated ones for security risks. AI Studio keeps the latest audit card until the plugin manifest changes. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T2081939459"] = "Bevor externe Assistenten aktiviert werden, prüft ein Modell neu installierte oder aktualisierte Assistenten auf Sicherheitsrisiken. AI Studio speichert die neueste Audit-Karte, bis sich das Plugin-Manifest ändert." + +-- AI Task: Security Audit for external Assistants +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T2200966468"] = "KI-Aufgabe: Sicherheitsprüfung für externe Assistenten" + -- Block activation below the minimum Audit-Level? UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T232834129"] = "Aktivierung unterhalb der Mindest-Audit-Stufe blockieren?" @@ -10374,8 +10380,14 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDI -- Disabling this setting turns off assistant plugin security audits. External assistants may then be activated and used even without a valid audit or after plugin changes. Do you really want to disable this protection? UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T2516645821::INFORMAL"] = "Wenn du diese Einstellung deaktivierst, werden die Sicherheitsprüfungen für Assistenten-Plugins ausgeschaltet. Externe Assistenten können dann auch ohne gültige Prüfung oder nach Änderungen an Plugins aktiviert und verwendet werden. Möchtest du diesen Schutz wirklich deaktivieren?" --- Agent: Security Audit for external Assistants -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T2910364422"] = "Agent: Sicherheitsaudit für externe Assistenten" +-- Automatic audits cannot run, because no model is available for security checks. Choose one above, or set an app-wide default provider in the app options. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T2857321563"] = "Automatische Prüfungen können nicht laufen, weil kein Modell für Sicherheitsprüfungen verfügbar ist. Wählen Sie oben eines aus oder legen Sie in den App-Einstellungen einen appweiten Standardanbieter fest." + +-- Automatic audits cannot run, because no model is available for security checks. Choose one above, or set an app-wide default provider in the app options. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T2857321563::INFORMAL"] = "Automatische Prüfungen können nicht laufen, weil kein Modell für Sicherheitsprüfungen verfügbar ist. Wähle oben eines aus oder lege in den App-Einstellungen einen appweiten Standardanbieter fest." + +-- Use the app default, otherwise the model chosen when auditing +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T2888830822"] = "App-Standard verwenden, sonst das bei der Prüfung gewählte Modell" -- External Assistant can be activated without an audit UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T2915620630"] = "Externer Assistent kann ohne Prüfung aktiviert werden" @@ -10401,101 +10413,101 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDI -- Activation is blocked below the minimum Audit-Level UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T4041192469"] = "Die Aktivierung ist unterhalb der Mindest-Audit-Stufe blockiert." --- Optionally choose a dedicated provider for assistant plugin audits. When left empty, AI Studio falls back to the app-wide default provider. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T4166969352"] = "Optional können Sie einen speziellen Anbieter für Audits auswählen. Wenn dieses Feld leer bleibt, verwendet AI Studio den appweiten Standardanbieter." +-- When enabled, you can preselect the model for this task and the confidence it needs. Without a preselected model, AI Studio uses the model of the assistant. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T1210631144"] = "Wenn diese Option aktiviert ist, können Sie das Modell für diese Aufgabe und das nötige Vertrauensniveau vorauswählen. Ohne vorausgewähltes Modell verwendet AI Studio das Modell des Assistenten." --- Optionally choose a dedicated provider for assistant plugin audits. When left empty, AI Studio falls back to the app-wide default provider. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T4166969352::INFORMAL"] = "Optional kannst du einen speziellen Anbieter für Audits auswählen. Wenn dieses Feld leer bleibt, verwendet AI Studio den appweiten Standardanbieter." +-- When enabled, you can preselect the model for this task and the confidence it needs. Without a preselected model, AI Studio uses the model of the assistant. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T1210631144::INFORMAL"] = "Wenn diese Option aktiviert ist, kannst du das Modell für diese Aufgabe und das nötige Vertrauensniveau vorauswählen. Ohne vorausgewähltes Modell verwendet AI Studio das Modell des Assistenten." --- This Agent audits newly installed or updated external Plugin-Assistant for security risks before they are activated and stores the latest audit card until the plugin manifest changes. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T893652865"] = "Dieser Agent überprüft neu installierte oder aktualisierte externe Assistenten-Plugins vor ihrer Aktivierung auf Sicherheitsrisiken und speichert die neueste Audit-Karte, bis sich das Plugin-Manifest ändert." +-- When an assistant loads content from the web, a model can clean it up: it extracts the main content, removes advertisements and other irrelevant things, and attempts to convert relative links into absolute links so that they can be used. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T1587139574"] = "Wenn ein Assistent Inhalte aus dem Internet lädt, kann ein Modell sie bereinigen: Es extrahiert den Hauptinhalt, entfernt Werbung und andere irrelevante Elemente und versucht, relative Links in absolute Links umzuwandeln, damit sie verwendet werden können." --- Use Case: this agent is used to clean up text content. It extracts the main content, removes advertisements and other irrelevant things, and attempts to convert relative links into absolute links so that they can be used. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T1299550589"] = "Anwendungsfall: Dieser Agent wird verwendet, um Textinhalte zu bereinigen. Er extrahiert den Hauptinhalt, entfernt Werbung und andere irrelevante Elemente und versucht, relative Links in absolute Links umzuwandeln, damit diese verwendet werden können." +-- Use the model of the assistant +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T2899245972"] = "Modell des Assistenten verwenden" --- Agent: Text Content Cleaner Options -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T3517268866"] = "Agent: Inhaltsbereinigung" +-- AI Task: Text Content Cleaner +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T3478589970"] = "KI-Aufgabe: Inhaltsbereinigung" -- No options are preselected UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T354528094"] = "Es sind keine Optionen vorausgewählt" --- When enabled, you can preselect some agent options. This might be useful when you prefer an LLM. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T3577764214"] = "Wenn diese Option aktiviert ist, können Sie einige Agenten-Optionen vorauswählen. Das kann nützlich sein, wenn Sie ein bestimmtes LLM bevorzugen." - --- When enabled, you can preselect some agent options. This might be useful when you prefer an LLM. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T3577764214::INFORMAL"] = "Wenn diese Option aktiviert ist, kannst du einige Agenten-Optionen vorauswählen. Das kann nützlich sein, wenn du ein bestimmtes LLM bevorzugst." - -- Preselect text content cleaner options? UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T3659087305"] = "Optionen des Agenten zur Inhaltsbereinigung vorauswählen?" -- Options are preselected UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T3875604319"] = "Optionen sind vorausgewählt" --- Use Case: this agent is used to select the appropriate data sources for the current prompt. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T2208143316"] = "Anwendungsfall: Dieser Agent wird verwendet, um die passenden Datenquellen für die aktuelle Eingabe auszuwählen." +-- AI Task: Data Source Selection +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T1227800581"] = "KI-Aufgabe: Wahl der Datenquellen" --- Agent: Data Source Selection Options -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T2258031949"] = "Agent: Wahl der Datenquellen" +-- When enabled, you can preselect the model for this task and the confidence it needs. Without a preselected model, AI Studio uses the model of the chat. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T2513220366"] = "Wenn diese Option aktiviert ist, können Sie das Modell für diese Aufgabe und das nötige Vertrauensniveau vorauswählen. Ohne vorausgewähltes Modell verwendet AI Studio das Modell des Chats." + +-- When enabled, you can preselect the model for this task and the confidence it needs. Without a preselected model, AI Studio uses the model of the chat. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T2513220366::INFORMAL"] = "Wenn diese Option aktiviert ist, kannst du das Modell für diese Aufgabe und das nötige Vertrauensniveau vorauswählen. Ohne vorausgewähltes Modell verwendet AI Studio das Modell des Chats." + +-- In classic RAG, which searches the data sources with every message, a model first selects the data sources which fit the current prompt. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T2522862914"] = "Beim klassischen RAG, das die Datenquellen bei jeder Nachricht durchsucht, wählt ein Modell zuerst die Datenquellen aus, die zum aktuellen Prompt passen." + +-- Use the model of the chat +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T3435835378"] = "Modell des Chats verwenden" -- No options are preselected UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T354528094"] = "Es sind keine Optionen vorausgewählt" --- When enabled, you can preselect some agent options. This might be useful when you prefer an LLM. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T3577764214"] = "Wenn diese Option aktiviert ist, können Sie einige Agenten-Optionen vorauswählen. Das kann nützlich sein, wenn Sie ein bestimmtes LLM bevorzugen." - --- When enabled, you can preselect some agent options. This might be useful when you prefer an LLM. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T3577764214::INFORMAL"] = "Wenn diese Option aktiviert ist, kannst du einige Agenten-Optionen vorauswählen. Das kann nützlich sein, wenn du ein bestimmtes LLM bevorzugst." - -- Options are preselected UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T3875604319"] = "Optionen sind vorausgewählt" -- Preselect data source selection options? UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T991598424"] = "Datenquellen-Auswahloptionen vorauswählen?" --- Use Case: this agent is used to validate any retrieval context of any retrieval process. Perhaps there are many of these retrieval contexts and you want to validate them all. Therefore, you might want to use a cheap and fast LLM for this job. When using a local or self-hosted LLM, look for a small (e.g. 3B) and fast model. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T1326813386"] = "Anwendungsfall: Dieser Agent wird verwendet, um beliebige Abrufkontexte in jedem Abrufprozess zu validieren. Möglicherweise gibt es viele solcher Abrufkontexte, und Sie möchten sie alle überprüfen. Daher empfiehlt es sich, für diese Aufgabe ein günstiges und schnelles LLM zu verwenden. Wenn Sie ein lokales oder selbst gehostetes LLM nutzen, sollten Sie auf ein kleines (z. B. 3B) und schnelles Modell achten." +-- Each validation is a request of its own, so more simultaneous validations mean as many simultaneous requests. Some providers limit the number of requests per minute. When you are unsure, choose a low setting between 1 and 6 validations. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T1490986595"] = "Jede Validierung ist eine eigene Anfrage. Mehr gleichzeitige Validierungen bedeuten also entsprechend viele gleichzeitige Anfragen. Einige Anbieter begrenzen die Anzahl der Anfragen pro Minute. Wenn Sie unsicher sind, wählen Sie eine niedrige Einstellung zwischen 1 und 6 Validierungen." --- Use Case: this agent is used to validate any retrieval context of any retrieval process. Perhaps there are many of these retrieval contexts and you want to validate them all. Therefore, you might want to use a cheap and fast LLM for this job. When using a local or self-hosted LLM, look for a small (e.g. 3B) and fast model. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T1326813386::INFORMAL"] = "Anwendungsfall: Dieser Agent wird verwendet, um beliebige Abrufkontexte in jedem Abrufprozess zu validieren. Möglicherweise gibt es viele solcher Abrufkontexte, und du möchtest sie alle überprüfen. Daher empfiehlt es sich, für diese Aufgabe ein günstiges und schnelles LLM zu verwenden. Wenn du ein lokales oder selbst gehostetes LLM nutzt, solltest du auf ein kleines (z. B. 3B) und schnelles Modell achten." +-- Each validation is a request of its own, so more simultaneous validations mean as many simultaneous requests. Some providers limit the number of requests per minute. When you are unsure, choose a low setting between 1 and 6 validations. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T1490986595::INFORMAL"] = "Jede Validierung ist eine eigene Anfrage. Mehr gleichzeitige Validierungen bedeuten also entsprechend viele gleichzeitige Anfragen. Einige Anbieter begrenzen die Anzahl der Anfragen pro Minute. Wenn du unsicher bist, wähle eine niedrige Einstellung zwischen 1 und 6 Validierungen." --- The validation agent is enabled -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T2274149855"] = "Der Validierungs-Agent ist aktiviert" +-- AI Task: Retrieval Context Validation +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T1717726852"] = "KI-Aufgabe: Validierung der Abrufkontexte" --- Enable the retrieval context validation agent? -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T2663872937"] = "Den Validierungs-Agenten für den Abrufkontext aktivieren?" +-- How many validations should run simultaneously? +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T2326205445"] = "Wie viele Validierungen sollen gleichzeitig ausgeführt werden?" + +-- When enabled, a model checks each retrieval context of classic RAG, whether it makes sense for the given prompt. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T240073404"] = "Wenn diese Option aktiviert ist, prüft ein Modell bei jedem Abrufkontext des klassischen RAG, ob er zum jeweiligen Prompt passt." + +-- Validate the retrieval contexts? +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T2428915017"] = "Abrufkontexte validieren?" + +-- When enabled, you can preselect the model for this task, the confidence it needs, and how many validations run simultaneously. Without a preselected model, AI Studio uses the model of the chat. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T2520295642"] = "Wenn diese Option aktiviert ist, können Sie das Modell für diese Aufgabe, das nötige Vertrauensniveau und die Zahl der gleichzeitigen Validierungen vorauswählen. Ohne vorausgewähltes Modell verwendet AI Studio das Modell des Chats." + +-- When enabled, you can preselect the model for this task, the confidence it needs, and how many validations run simultaneously. Without a preselected model, AI Studio uses the model of the chat. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T2520295642::INFORMAL"] = "Wenn diese Option aktiviert ist, kannst du das Modell für diese Aufgabe, das nötige Vertrauensniveau und die Zahl der gleichzeitigen Validierungen vorauswählen. Ohne vorausgewähltes Modell verwendet AI Studio das Modell des Chats." -- Preselect retrieval context validation options? UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T2663938643"] = "Optionen zur Überprüfung des Abrufkontexts vorauswählen?" --- agents -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T2669785679"] = "Agenten" - --- When enabled, the retrieval context validation agent will check each retrieval context of any retrieval process, whether a context makes sense for the given prompt. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T298440039"] = "Wenn diese Option aktiviert ist, prüft der Validierungs-Agent für Abrufkontexte bei jedem Abrufprozess, ob der jeweilige Kontext zum eingegebenen Prompt passt." - --- How many validation agents should work simultaneously? -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T3431541788"] = "Wie viele Validierungs-Agenten sollten gleichzeitig arbeiten?" +-- Use the model of the chat +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T3435835378"] = "Modell des Chats verwenden" -- No options are preselected UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T354528094"] = "Es sind keine Optionen vorausgewählt" --- When enabled, you can preselect some agent options. This might be useful when you prefer an LLM. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T3577764214"] = "Wenn diese Option aktiviert ist, können Sie einige Agenten-Optionen vorauswählen. Das kann nützlich sein, wenn Sie ein bestimmtes LLM bevorzugen." - --- When enabled, you can preselect some agent options. This might be useful when you prefer an LLM. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T3577764214::INFORMAL"] = "Wenn diese Option aktiviert ist, kannst du einige Agenten-Optionen vorauswählen. Das kann nützlich sein, wenn du ein bestimmtes LLM bevorzugst." - --- More active agents also mean that a corresponding number of requests are made simultaneously. Some providers limit the number of requests per minute. When you are unsure, choose a low setting between 1 to 6 agents. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T3819544890"] = "Mehr aktive Agenten bedeuten auch, dass entsprechend viele Anfragen gleichzeitig gestellt werden. Einige Anbieter begrenzen die Anzahl der Anfragen pro Minute. Wenn Sie unsicher sind, wählen Sie eine niedrige Einstellung zwischen 1 und 6 Agenten." - --- More active agents also mean that a corresponding number of requests are made simultaneously. Some providers limit the number of requests per minute. When you are unsure, choose a low setting between 1 to 6 agents. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T3819544890::INFORMAL"] = "Mehr aktive Agenten bedeuten auch, dass entsprechend viele Anfragen gleichzeitig gestellt werden. Einige Anbieter begrenzen die Anzahl der Anfragen pro Minute. Wenn du unsicher bist, wähle eine niedrige Einstellung zwischen 1 und 6 Agenten." - -- Options are preselected UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T3875604319"] = "Optionen sind vorausgewählt" --- Agent: Retrieval Context Validation Options -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T928989804"] = "Agent: Validierung der Abrufkontexte" +-- validations +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T595734827"] = "Validierungen" + +-- Each retrieval context is validated +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T705018823"] = "Jeder Abrufkontext wird validiert" + +-- In classic RAG, a model checks each retrieval context, i.e., each passage found in the data sources, whether it fits the current prompt. There can be many of them, so you might want to use a cheap and fast model for this job. When using a local or self-hosted model, look for a small (e.g., 3B) and fast one. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T765642962"] = "Beim klassischen RAG prüft ein Modell jeden Abrufkontext – also jede Textstelle, die in den Datenquellen gefunden wurde – darauf, ob er zum aktuellen Prompt passt. Da es viele davon geben kann, empfiehlt sich für diese Aufgabe ein kostengünstiges und schnelles Modell. Wenn Sie ein lokales oder selbst gehostetes Modell verwenden, wählen Sie ein kleines (z. B. 3B) und schnelles Modell aus." + +-- In classic RAG, a model checks each retrieval context, i.e., each passage found in the data sources, whether it fits the current prompt. There can be many of them, so you might want to use a cheap and fast model for this job. When using a local or self-hosted model, look for a small (e.g., 3B) and fast one. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T765642962::INFORMAL"] = "Beim klassischen RAG prüft ein Modell jeden Abrufkontext – also jede Textstelle, die in den Datenquellen gefunden wurde – darauf, ob er zum aktuellen Prompt passt. Da es viele davon geben kann, empfiehlt sich für diese Aufgabe ein kostengünstiges und schnelles Modell. Wenn du ein lokales oder selbst gehostetes Modell verwendest, wähle ein kleines (z. B. 3B) und schnelles Modell aus." -- No validation is performed UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T95175095"] = "Es findet keine Validierung statt" @@ -10509,6 +10521,12 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAPP::T1118505044"] -- Do you want to show preview features in the app? UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAPP::T1118505044::INFORMAL"] = "Möchtest du Vorschaufunktionen in der App anzeigen lassen?" +-- When enabled, requests to self-hosted providers and LiteLLM name the feature that sent them, e.g., the chat, an assistant, or an AI task, together with the version of AI Studio and your operating system. This lets the operators of these servers, usually your organization, see which features are used. Cloud providers never receive these details, and AI Studio never sends anything to its developers. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAPP::T1140234771"] = "Wenn diese Option aktiviert ist, nennen Anfragen an selbst gehostete Anbieter und LiteLLM die Funktion, von der sie stammen, zum Beispiel den Chat, einen Assistenten oder eine KI-Aufgabe. Dazu kommen die Version von AI Studio und Ihr Betriebssystem. So sehen die Betreiber dieser Server, in der Regel Ihre Organisation, welche Funktionen genutzt werden. Cloud-Anbieter erhalten diese Angaben nie, und AI Studio sendet niemals etwas an seine Entwickler." + +-- When enabled, requests to self-hosted providers and LiteLLM name the feature that sent them, e.g., the chat, an assistant, or an AI task, together with the version of AI Studio and your operating system. This lets the operators of these servers, usually your organization, see which features are used. Cloud providers never receive these details, and AI Studio never sends anything to its developers. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAPP::T1140234771::INFORMAL"] = "Wenn diese Option aktiviert ist, nennen Anfragen an selbst gehostete Anbieter und LiteLLM die Funktion, von der sie stammen, zum Beispiel den Chat, einen Assistenten oder eine KI-Aufgabe. Dazu kommen die Version von AI Studio und dein Betriebssystem. So sehen die Betreiber dieser Server, in der Regel deine Organisation, welche Funktionen genutzt werden. Cloud-Anbieter erhalten diese Angaben nie, und AI Studio sendet niemals etwas an seine Entwickler." + -- AI Studio cannot check for updates when running as a Flatpak. Updates are managed outside the app. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAPP::T1190632518"] = "AI Studio kann bei Ausführung als Flatpak nicht nach Updates suchen. Updates werden außerhalb der App verwaltet." @@ -10614,12 +10632,6 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAPP::T1907446663"] -- Select the language for the app. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAPP::T1907446663::INFORMAL"] = "Wähle die Sprache für die App aus." --- When enabled, requests to self-hosted providers and LiteLLM name the feature that sent them, e.g., the chat, an assistant, or an agent, together with the version of AI Studio and your operating system. This lets the operators of these servers, usually your organization, see which features are used. Cloud providers never receive these details, and AI Studio never sends anything to its developers. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAPP::T1907749697"] = "Wenn diese Option aktiviert ist, nennen Anfragen an selbst gehostete Anbieter und LiteLLM die Funktion, von der sie stammen, zum Beispiel den Chat, einen Assistenten oder einen Agenten. Dazu kommen die Version von AI Studio und Ihr Betriebssystem. So sehen die Betreiber dieser Server, in der Regel Ihre Organisation, welche Funktionen genutzt werden. Cloud-Anbieter erhalten diese Angaben nie, und AI Studio sendet niemals etwas an seine Entwickler." - --- When enabled, requests to self-hosted providers and LiteLLM name the feature that sent them, e.g., the chat, an assistant, or an agent, together with the version of AI Studio and your operating system. This lets the operators of these servers, usually your organization, see which features are used. Cloud providers never receive these details, and AI Studio never sends anything to its developers. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAPP::T1907749697::INFORMAL"] = "Wenn diese Option aktiviert ist, nennen Anfragen an selbst gehostete Anbieter und LiteLLM die Funktion, von der sie stammen, zum Beispiel den Chat, einen Assistenten oder einen Agenten. Dazu kommen die Version von AI Studio und dein Betriebssystem. So sehen die Betreiber dieser Server, in der Regel deine Organisation, welche Funktionen genutzt werden. Cloud-Anbieter erhalten diese Angaben nie, und AI Studio sendet niemals etwas an seine Entwickler." - -- Your organization has disabled update checks and installations. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAPP::T1909339369"] = "Ihre Organisation hat die Suche nach Updates und deren Installation deaktiviert." @@ -11925,6 +11937,12 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T193192210"] = " -- null UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T1996966820"] = "null" +-- The model set for security checks no longer exists. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T2001789726"] = "Das für Sicherheitsprüfungen festgelegte Modell existiert nicht mehr. Wählen Sie hier ein Modell aus, um dieses Plugin zu prüfen. Ihre Auswahl gilt nur für diese Prüfung; in den App-Einstellungen können Sie ein dauerhaftes Modell festlegen." + +-- The model set for security checks no longer exists. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T2001789726::INFORMAL"] = "Das für Sicherheitsprüfungen festgelegte Modell existiert nicht mehr. Wähle hier ein Modell aus, um dieses Plugin zu prüfen. Deine Auswahl gilt nur für diese Prüfung; in den App-Einstellungen kannst du ein dauerhaftes Modell festlegen." + -- Properties UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T2177370620"] = "Eigenschaften" @@ -11943,9 +11961,27 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T273798258"] = " -- Size UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T2789707388"] = "Größe" +-- Your organization does not allow the model set for security checks. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T2882229141"] = "Das für Sicherheitsprüfungen festgelegte Modell ist von Ihrer Organisation nicht zugelassen. Wählen Sie hier ein Modell aus, um dieses Plugin zu prüfen. Ihre Auswahl gilt nur für diese Prüfung; in den App-Einstellungen können Sie ein dauerhaftes Modell festlegen." + +-- Your organization does not allow the model set for security checks. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T2882229141::INFORMAL"] = "Das für Sicherheitsprüfungen festgelegte Modell ist von deiner Organisation nicht zugelassen. Wähle hier ein Modell aus, um dieses Plugin zu prüfen. Deine Auswahl gilt nur für diese Prüfung; in den App-Einstellungen kannst du ein dauerhaftes Modell festlegen." + +-- The model set for security checks is not trusted enough for them. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T2917601715"] = "Das für Sicherheitsprüfungen festgelegte Modell ist dafür nicht vertrauenswürdig genug. Wählen Sie hier ein Modell aus, um dieses Plugin zu prüfen. Ihre Auswahl gilt nur für diese Prüfung; in den App-Einstellungen können Sie ein dauerhaftes Modell festlegen." + +-- The model set for security checks is not trusted enough for them. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T2917601715::INFORMAL"] = "Das für Sicherheitsprüfungen festgelegte Modell ist dafür nicht vertrauenswürdig genug. Wähle hier ein Modell aus, um dieses Plugin zu prüfen. Deine Auswahl gilt nur für diese Prüfung; in den App-Einstellungen kannst du ein dauerhaftes Modell festlegen." + -- No model configured UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T2941224401"] = "Kein Modell konfiguriert" +-- No model is set for security checks, neither for this AI task nor for the app as a whole. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T3013234535"] = "Für Sicherheitsprüfungen ist weder für diese KI-Aufgabe noch appweit ein Modell festgelegt. Wählen Sie hier eines aus, um dieses Plugin zu prüfen. Ihre Auswahl gilt nur für diese Prüfung; in den App-Einstellungen können Sie ein dauerhaftes Modell festlegen." + +-- No model is set for security checks, neither for this AI task nor for the app as a whole. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T3013234535::INFORMAL"] = "Für Sicherheitsprüfungen ist weder für diese KI-Aufgabe noch appweit ein Modell festgelegt. Wähle hier eines aus, um dieses Plugin zu prüfen. Deine Auswahl gilt nur für diese Prüfung; in den App-Einstellungen kannst du ein dauerhaftes Modell festlegen." + -- Prompt: set UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T3156437951"] = "Prompt: festgelegt" @@ -12003,12 +12039,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T521056824::INFO -- Audit model UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T532102309"] = "Audit-Modell" --- No model is set for security checks, neither for this agent nor for the app as a whole. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings. -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T614645381"] = "Für Sicherheitsprüfungen ist weder für diesen Agenten noch appweit ein Modell festgelegt. Wählen Sie hier eines aus, um dieses Plugin zu prüfen. Ihre Auswahl gilt nur für diese Prüfung; in den App-Einstellungen können Sie ein dauerhaftes Modell festlegen." - --- No model is set for security checks, neither for this agent nor for the app as a whole. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings. -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T614645381::INFORMAL"] = "Für Sicherheitsprüfungen ist weder für diesen Agenten noch appweit ein Modell festgelegt. Wähle hier eines aus, um dieses Plugin zu prüfen. Deine Auswahl gilt nur für diese Prüfung; in den App-Einstellungen kannst du ein dauerhaftes Modell festlegen." - -- System Prompt UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T628396066"] = "System-Prompt" @@ -16593,9 +16623,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGJOBPOSTINGS::T386176 -- When enabled, you can preselect some job posting options. This might be useful when you prefer a specific LLM model. UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGJOBPOSTINGS::T3861766667::INFORMAL"] = "Wenn diese Option aktiviert ist, kannst du einige Optionen für Stellenanzeigen vorauswählen. Das kann nützlich sein, wenn du ein bestimmtes LLM bevorzugst." --- Content cleaner agent is preselected -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T1013787967"] = "Agent zur Inhaltsbereinigung ist vorausgewählt" - -- Web content reader is shown UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T1030372436"] = "Der Web-Content-Reader wird angezeigt" @@ -16623,8 +16650,11 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T1766361 -- Choose whether the assistant should use the app default profile, no profile, or a specific profile. UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T1766361623::INFORMAL"] = "Wähle, ob der Assistent das Standardprofil der App, kein Profil oder ein bestimmtes Profil verwenden soll." --- Content cleaner agent is not preselected -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T1969816694"] = "Agent zur Inhaltsbereinigung ist nicht vorausgewählt" +-- When enabled, the text content cleaner is preselected. This might be useful when you prefer to clean up the legal content before translating it. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T1958081245"] = "Wenn diese Option aktiviert ist, ist die Inhaltsbereinigung vorausgewählt. Das kann nützlich sein, wenn Sie den rechtlichen Inhalt bereinigen möchten, bevor Sie ihn übersetzen." + +-- When enabled, the text content cleaner is preselected. This might be useful when you prefer to clean up the legal content before translating it. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T1958081245::INFORMAL"] = "Wenn diese Option aktiviert ist, ist die Inhaltsbereinigung vorausgewählt. Das kann nützlich sein, wenn du den rechtlichen Inhalt bereinigen möchtest, bevor du ihn übersetzt." -- When enabled, the web content reader is preselected. This might be useful when you prefer to load legal content from the web very often. UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T1993094764"] = "Wenn diese Option aktiviert ist, wird der Web-Content-Reader vorausgewählt. Das kann nützlich sein, wenn Sie häufig juristische Inhalte aus dem Internet laden möchten." @@ -16644,27 +16674,27 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T2529161 -- Web content reader is hidden UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T2799795311"] = "Der Web-Content-Reader ist ausgeblendet" +-- Text content cleaner is not preselected +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T284131714"] = "Inhaltsbereinigung ist nicht vorausgewählt" + +-- Preselect the text content cleaner? +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T2981779520"] = "Inhaltsbereinigung vorauswählen?" + -- Close UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T3448155331"] = "Schließen" -- Web content reader is preselected UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T3641773985"] = "Der Web-Content-Reader ist vorausgewählt" --- Preselect the content cleaner agent? -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T3649428096"] = "Agent zur Inhaltsbereinigung vorauswählen?" - -- Assistant: Legal Check Options UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T4033382756"] = "Assistent: Optionen für die rechtliche Prüfung" --- When enabled, the content cleaner agent is preselected. This might be useful when you prefer to clean up the legal content before translating it. -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T4049873385"] = "Wenn diese Option aktiviert ist, ist der Agent zur Inhaltsbereinigung vorausgewählt. Das kann nützlich sein, wenn Sie den rechtlichen Inhalt bereinigen möchten, bevor Sie ihn übersetzen." - --- When enabled, the content cleaner agent is preselected. This might be useful when you prefer to clean up the legal content before translating it. -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T4049873385::INFORMAL"] = "Wenn diese Option aktiviert ist, ist der Agent zur Inhaltsbereinigung vorausgewählt. Das kann nützlich sein, wenn du den rechtlichen Inhalt bereinigen möchtest, bevor du ihn übersetzt." - -- Preselect the web content reader? UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T629158142"] = "Den Web-Content-Reader vorauswählen?" +-- Text content cleaner is preselected +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T845988899"] = "Inhaltsbereinigung ist vorausgewählt" + -- No preset preselected UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGMODELCOMPARISON::T1028082569"] = "Keine Voreinstellung vorausgewählt" @@ -17103,9 +17133,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSLIDEBUILDER::T99564 -- A slide holds at most this many bullet points, in all of its text slots together. Match it to the room for text in the layouts of your template. UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSLIDEBUILDER::T995644230::INFORMAL"] = "Eine Folie enthält höchstens so viele Aufzählungspunkte, in allen ihren Textfeldern zusammen. Stimme den Wert auf den Platz für Text in den Layouts deiner Vorlage ab." --- Content cleaner agent is preselected -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T1013787967"] = "Agent zur Inhaltsbereinigung ist vorausgewählt" - -- Web content reader is shown UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T1030372436"] = "Der Web-Content-Reader wird angezeigt" @@ -17121,9 +17148,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T16331 -- Web content reader is not preselected UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T1701127912"] = "Der Web-Content-Reader ist nicht vorausgewählt" --- Content cleaner agent is not preselected -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T1969816694"] = "Agent zur Inhaltsbereinigung ist nicht vorausgewählt" - -- Hide the web content reader? UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T2090693677"] = "Web-Content-Reader ausblenden?" @@ -17133,21 +17157,27 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T21718 -- No SWOT analysis options are preselected UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T2361666775"] = "Es sind keine Optionen für die SWOT-Analyse vorausgewählt" +-- When enabled, the text content cleaner is preselected for cleaning website content before it is analyzed. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T2429021439"] = "Wenn diese Option aktiviert ist, ist die Inhaltsbereinigung vorausgewählt, um Webinhalte vor der Analyse zu bereinigen." + -- Preselect SWOT analysis options? UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T2593950994"] = "Optionen für die SWOT-Analyse vorauswählen?" -- Web content reader is hidden UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T2799795311"] = "Der Web-Content-Reader ist ausgeblendet" +-- Text content cleaner is not preselected +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T284131714"] = "Inhaltsbereinigung ist nicht vorausgewählt" + +-- Preselect the text content cleaner? +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T2981779520"] = "Inhaltsbereinigung vorauswählen?" + -- When enabled, the web content reader is preselected. This is useful when you often analyze content from websites. UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T3088856907"] = "Wenn diese Option aktiviert ist, ist der Web-Content-Reader vorausgewählt. Das kann nützlich sein, wenn Sie häufig Inhalte von Websites analysieren." -- When enabled, the web content reader is preselected. This is useful when you often analyze content from websites. UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T3088856907::INFORMAL"] = "Wenn diese Option aktiviert ist, ist der Web-Content-Reader vorausgewählt. Das kann nützlich sein, wenn du häufig Inhalte von Websites analysierst." --- When enabled, the content cleaner agent is preselected for cleaning website content before it is analyzed. -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T332064979"] = "Wenn diese Option aktiviert ist, ist der Agent zur Inhaltsbereinigung vorausgewählt, um Webinhalte vor der Analyse zu bereinigen." - -- Close UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T3448155331"] = "Schließen" @@ -17157,9 +17187,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T35473 -- Web content reader is preselected UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T3641773985"] = "Der Web-Content-Reader ist vorausgewählt" --- Preselect the content cleaner agent? -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T3649428096"] = "Agent zur Inhaltsbereinigung vorauswählen?" - -- Specify topics the SWOT analysis should pay particular attention to. UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T3857591121"] = "Geben Sie die Themen an, auf die die SWOT-Analyse besonders achten soll." @@ -17175,6 +17202,9 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T62915 -- Preselect an analysis focus UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T656094797"] = "Analysefokus vorauswählen" +-- Text content cleaner is preselected +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T845988899"] = "Inhaltsbereinigung ist vorausgewählt" + -- When enabled, you can preselect the SWOT analysis options. This is useful when you prefer a specific language, analysis focus, or LLM. UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T975761680"] = "Wenn diese Option aktiviert ist, können Sie die Optionen für die SWOT-Analyse vorauswählen. Das kann nützlich sein, wenn Sie eine bestimmte Sprache, einen bestimmten Analysefokus oder ein bestimmtes LLM bevorzugen." @@ -17211,9 +17241,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSYNONYMS::T388911788 -- Preselect synonym options? UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSYNONYMS::T4170921846"] = "Synonymoptionen vorauswählen?" --- Content cleaner agent is preselected -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T1013787967"] = "Agent zur Inhaltsbereinigung ist vorausgewählt" - -- Web content reader is shown UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T1030372436"] = "Der Web-Content-Reader wird angezeigt" @@ -17229,12 +17256,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T141 -- Preselect another target language UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T1462295644"] = "Eine andere Zielsprache vorauswählen" --- When enabled, the content cleaner agent is preselected. This might be useful when you prefer to clean up the content before summarizing it. -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T154694569"] = "Wenn diese Option aktiviert ist, wird der Agent zur Inhaltsbereinigung automatisch vorausgewählt. Das kann nützlich sein, wenn Sie den Inhalt bereinigen möchten, bevor Sie ihn zusammenfassen." - --- When enabled, the content cleaner agent is preselected. This might be useful when you prefer to clean up the content before summarizing it. -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T154694569::INFORMAL"] = "Wenn diese Option aktiviert ist, wird der Agent zur Inhaltsbereinigung automatisch vorausgewählt. Das kann nützlich sein, wenn du den Inhalt bereinigen möchtest, bevor du ihn zusammenfasst." - -- When activated, the web content reader is hidden and cannot be used. As a result, the user interface becomes a bit easier to use. UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T1633101895"] = "Wenn diese Option aktiviert ist, wird der Web-Content-Reader ausgeblendet und kann nicht verwendet werden. Dadurch wird die Benutzeroberfläche etwas einfacher zu bedienen." @@ -17244,9 +17265,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T170 -- Assistant: Text Summarizer Options UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T1767527569"] = "Assistent: Optionen für die Textzusammenfassung" --- Content cleaner agent is not preselected -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T1969816694"] = "Agent zur Inhaltsbereinigung ist nicht vorausgewählt" - -- Hide the web content reader? UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T2090693677"] = "Web-Content-Reader ausblenden?" @@ -17262,6 +17280,12 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T244 -- Web content reader is hidden UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T2799795311"] = "Der Web-Content-Reader ist ausgeblendet" +-- Text content cleaner is not preselected +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T284131714"] = "Inhaltsbereinigung ist nicht vorausgewählt" + +-- Preselect the text content cleaner? +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T2981779520"] = "Inhaltsbereinigung vorauswählen?" + -- No summarizer options are preselected UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T3215334223"] = "Es sind keine Optionen für die Textzusammenfassung vorausgewählt" @@ -17280,12 +17304,15 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T354 -- Web content reader is preselected UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T3641773985"] = "Der Web-Content-Reader ist vorausgewählt" --- Preselect the content cleaner agent? -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T3649428096"] = "Agent zur Inhaltsbereinigung vorauswählen?" - -- Preselect important aspects UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T3705987833"] = "Wichtige Aspekte vorauswählen" +-- When enabled, the text content cleaner is preselected. This might be useful when you prefer to clean up the content before summarizing it. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T402180229"] = "Wenn diese Option aktiviert ist, ist die Inhaltsbereinigung vorausgewählt. Das kann nützlich sein, wenn Sie den Inhalt bereinigen möchten, bevor Sie ihn zusammenfassen." + +-- When enabled, the text content cleaner is preselected. This might be useful when you prefer to clean up the content before summarizing it. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T402180229::INFORMAL"] = "Wenn diese Option aktiviert ist, ist die Inhaltsbereinigung vorausgewählt. Das kann nützlich sein, wenn du den Inhalt bereinigen möchtest, bevor du ihn zusammenfasst." + -- Which summarizer complexity should be preselected? UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T408530182"] = "Welche Komplexität der Zusammenfassung soll vorausgewählt werden?" @@ -17301,8 +17328,8 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T511 -- Preselect the web content reader? UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T629158142"] = "Den Web-Content-Reader vorauswählen?" --- Content cleaner agent is preselected -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T1013787967"] = "Agent zur Inhaltsbereinigung ist vorausgewählt" +-- Text content cleaner is preselected +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T845988899"] = "Inhaltsbereinigung ist vorausgewählt" -- Assistant: Translator Options UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T1016384269"] = "Assistent: Übersetzeroptionen" @@ -17328,8 +17355,11 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T170112 -- Live translation is not preselected UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T1825690873"] = "Live-Übersetzung ist nicht vorausgewählt" --- Content cleaner agent is not preselected -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T1969816694"] = "Agent zur Inhaltsbereinigung ist nicht vorausgewählt" +-- When enabled, the text content cleaner is preselected. This might be useful when you prefer to clean up the content before translating it. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T1936357390"] = "Wenn diese Option aktiviert ist, ist die Inhaltsbereinigung vorausgewählt. Das kann nützlich sein, wenn Sie den Inhalt vor der Übersetzung bereinigen möchten." + +-- When enabled, the text content cleaner is preselected. This might be useful when you prefer to clean up the content before translating it. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T1936357390::INFORMAL"] = "Wenn diese Option aktiviert ist, ist die Inhaltsbereinigung vorausgewählt. Das kann nützlich sein, wenn du den Inhalt vor der Übersetzung bereinigen möchtest." -- Preselect translator options? UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T1989346399"] = "Übersetzeroptionen vorauswählen?" @@ -17346,9 +17376,15 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T243574 -- Web content reader is hidden UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T2799795311"] = "Der Web-Content-Reader ist ausgeblendet" +-- Text content cleaner is not preselected +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T284131714"] = "Inhaltsbereinigung ist nicht vorausgewählt" + -- No translator options are preselected UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T2866358796"] = "Es sind keine Übersetzeroptionen vorausgewählt" +-- Preselect the text content cleaner? +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T2981779520"] = "Inhaltsbereinigung vorauswählen?" + -- Close UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T3448155331"] = "Schließen" @@ -17364,9 +17400,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T354826 -- Web content reader is preselected UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T3641773985"] = "Der Web-Content-Reader ist vorausgewählt" --- Preselect the content cleaner agent? -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T3649428096"] = "Agent zur Inhaltsbereinigung vorauswählen?" - -- When enabled, you can preselect the translator options. This might be useful when you prefer a specific target language or LLM model. UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T4195511669"] = "Wenn diese Option aktiviert ist, können Sie die Übersetzeroptionen vorauswählen. Das kann nützlich sein, wenn Sie eine bestimmte Zielsprache oder ein bestimmtes LLM bevorzugen." @@ -17376,11 +17409,8 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T419551 -- Preselect the web content reader? UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T629158142"] = "Den Web-Content-Reader vorauswählen?" --- When enabled, the content cleaner agent is preselected. This might be useful when you prefer to clean up the content before translating it. -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T82436938"] = "Wenn diese Option aktiviert ist, ist der Agent zur Inhaltsbereinigung vorausgewählt. Das kann nützlich sein, wenn Sie den Inhalt vor der Übersetzung bereinigen möchten." - --- When enabled, the content cleaner agent is preselected. This might be useful when you prefer to clean up the content before translating it. -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T82436938::INFORMAL"] = "Wenn diese Option aktiviert ist, ist der Agent zur Inhaltsbereinigung vorausgewählt. Das kann nützlich sein, wenn du den Inhalt vor der Übersetzung bereinigen möchtest." +-- Text content cleaner is preselected +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T845988899"] = "Inhaltsbereinigung ist vorausgewählt" -- How fast should the live translation react? UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T884246296"] = "Wie schnell soll die Live-Übersetzung reagieren?" @@ -18180,12 +18210,6 @@ UI_TEXT_CONTENT["AISTUDIO::PAGES::ASSISTANTS::T3011450657"] = "Meine Aufgaben" -- E-Mail UI_TEXT_CONTENT["AISTUDIO::PAGES::ASSISTANTS::T3026443472"] = "E-Mail" --- The automatic security audit for the assistant plugin '{0}' failed. Please run it manually from the plugins page. -UI_TEXT_CONTENT["AISTUDIO::PAGES::ASSISTANTS::T311775455"] = "Die automatische Sicherheitsprüfung für das Assistenten-Plugin „{0}“ ist fehlgeschlagen. Bitte führen Sie sie manuell auf der Plugin-Seite aus." - --- The automatic security audit for the assistant plugin '{0}' failed. Please run it manually from the plugins page. -UI_TEXT_CONTENT["AISTUDIO::PAGES::ASSISTANTS::T311775455::INFORMAL"] = "Die automatische Sicherheitsprüfung für das Assistenten-Plugin „{0}“ ist fehlgeschlagen. Bitte führe sie manuell auf der Plugin-Seite aus." - -- Translate AI Studio text content into other languages UI_TEXT_CONTENT["AISTUDIO::PAGES::ASSISTANTS::T3181803840"] = "Textinhalte von AI Studio in andere Sprachen übersetzen." @@ -19512,12 +19536,6 @@ UI_TEXT_CONTENT["AISTUDIO::PAGES::PLUGINS::T3974628410"] = "Bitte legen Sie jewe -- Please drop only one plugin archive at a time. UI_TEXT_CONTENT["AISTUDIO::PAGES::PLUGINS::T3974628410::INFORMAL"] = "Bitte lege jeweils nur ein Plugin-Archiv gleichzeitig ab." --- The automatic security audit for the assistant plugin '{0}' failed. Please run it manually. -UI_TEXT_CONTENT["AISTUDIO::PAGES::PLUGINS::T4066679817"] = "Die automatische Sicherheitsprüfung für das Assistenten-Plugin „{0}“ ist fehlgeschlagen. Bitte führen Sie sie manuell aus." - --- The automatic security audit for the assistant plugin '{0}' failed. Please run it manually. -UI_TEXT_CONTENT["AISTUDIO::PAGES::PLUGINS::T4066679817::INFORMAL"] = "Die automatische Sicherheitsprüfung für das Assistenten-Plugin „{0}“ ist fehlgeschlagen. Bitte führe sie manuell aus." - -- The assistant plugin '{0}' has been successfully revised. UI_TEXT_CONTENT["AISTUDIO::PAGES::PLUGINS::T4157246824"] = "Das Assistenten-Plugin „{0}“ wurde erfolgreich überarbeitet." @@ -21543,6 +21561,54 @@ UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLAINFILEEXPORT::T1713926719"] = "Der Export w -- The export failed. UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLAINFILEEXPORT::T1895034475"] = "Der Export ist fehlgeschlagen." +-- The organization does not allow the provider for security checks. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T1679509394"] = "Die Organisation lässt den Anbieter für Sicherheitsprüfungen nicht zu." + +-- AI Studio did not audit new or updated assistant plugins automatically, because no model is set for security checks, and there is no app-wide default either. Choose a model for security checks in the settings. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T1994155532"] = "AI Studio hat neue oder aktualisierte Assistenten-Plugins nicht automatisch geprüft, weil weder ein Modell für Sicherheitsprüfungen noch ein appweiter Standardanbieter festgelegt ist. Wählen Sie in den Einstellungen ein Modell für Sicherheitsprüfungen aus." + +-- AI Studio did not audit new or updated assistant plugins automatically, because no model is set for security checks, and there is no app-wide default either. Choose a model for security checks in the settings. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T1994155532::INFORMAL"] = "AI Studio hat neue oder aktualisierte Assistenten-Plugins nicht automatisch geprüft, weil weder ein Modell für Sicherheitsprüfungen noch ein appweiter Standardanbieter festgelegt ist. Wähle in den Einstellungen ein Modell für Sicherheitsprüfungen aus." + +-- No audit provider is configured. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T2034826200"] = "Es ist kein Audit-Anbieter konfiguriert." + +-- Your organization does not allow the provider for security checks. Pick another one, or choose a dedicated provider for security checks in the app settings. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T2109782167"] = "Der Anbieter für Sicherheitsprüfungen ist in Ihrer Organisation nicht zugelassen. Wählen Sie einen anderen aus oder legen Sie in den App-Einstellungen einen eigens für Sicherheitsprüfungen vorgesehenen Anbieter fest." + +-- Your organization does not allow the provider for security checks. Pick another one, or choose a dedicated provider for security checks in the app settings. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T2109782167::INFORMAL"] = "Der Anbieter für Sicherheitsprüfungen ist in deiner Organisation nicht zugelassen. Wähle einen anderen aus oder lege in den App-Einstellungen einen eigens für Sicherheitsprüfungen vorgesehenen Anbieter fest." + +-- The provider is not trusted enough for security checks. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T2861409367"] = "Der Anbieter ist für Sicherheitsprüfungen nicht vertrauenswürdig genug." + +-- The automatic security audit for the assistant plugin '{0}' failed. Please run it manually on the plugins page. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T3322815862"] = "Die automatische Sicherheitsprüfung für das Assistenten-Plugin „{0}“ ist fehlgeschlagen. Bitte führen Sie sie manuell auf der Plugin-Seite aus." + +-- The automatic security audit for the assistant plugin '{0}' failed. Please run it manually on the plugins page. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T3322815862::INFORMAL"] = "Die automatische Sicherheitsprüfung für das Assistenten-Plugin „{0}“ ist fehlgeschlagen. Bitte führe sie manuell auf der Plugin-Seite aus." + +-- AI Studio did not audit new or updated assistant plugins automatically, because the model for security checks is not trusted enough. Choose another one in the settings. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T3336137740"] = "AI Studio hat neue oder aktualisierte Assistenten-Plugins nicht automatisch geprüft, weil das Modell für Sicherheitsprüfungen nicht vertrauenswürdig genug ist. Wählen Sie in den Einstellungen ein anderes aus." + +-- AI Studio did not audit new or updated assistant plugins automatically, because the model for security checks is not trusted enough. Choose another one in the settings. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T3336137740::INFORMAL"] = "AI Studio hat neue oder aktualisierte Assistenten-Plugins nicht automatisch geprüft, weil das Modell für Sicherheitsprüfungen nicht vertrauenswürdig genug ist. Wähle in den Einstellungen ein anderes aus." + +-- No provider is configured for security checks. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T3445977179"] = "Für Sicherheitsprüfungen ist kein Anbieter konfiguriert." + +-- AI Studio did not audit new or updated assistant plugins automatically, because your organization does not allow the model for security checks. Choose another one in the settings. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T399386793"] = "AI Studio hat neue oder aktualisierte Assistenten-Plugins nicht automatisch geprüft, weil Ihre Organisation das Modell für Sicherheitsprüfungen nicht zulässt. Wählen Sie in den Einstellungen ein anderes aus." + +-- AI Studio did not audit new or updated assistant plugins automatically, because your organization does not allow the model for security checks. Choose another one in the settings. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T399386793::INFORMAL"] = "AI Studio hat neue oder aktualisierte Assistenten-Plugins nicht automatisch geprüft, weil deine Organisation das Modell für Sicherheitsprüfungen nicht zulässt. Wähle in den Einstellungen ein anderes aus." + +-- The selected provider is not trusted enough for security checks. Pick one which meets the confidence required here, or choose a dedicated provider for security checks in the app settings. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T4104574219"] = "Der ausgewählte Anbieter ist für Sicherheitsprüfungen nicht vertrauenswürdig genug. Wählen Sie einen Anbieter, der das hier erforderliche Vertrauensniveau erreicht, oder legen Sie in den App-Einstellungen einen eigens für Sicherheitsprüfungen vorgesehenen Anbieter fest." + +-- The selected provider is not trusted enough for security checks. Pick one which meets the confidence required here, or choose a dedicated provider for security checks in the app settings. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T4104574219::INFORMAL"] = "Der ausgewählte Anbieter ist für Sicherheitsprüfungen nicht vertrauenswürdig genug. Wähle einen Anbieter, der das hier erforderliche Vertrauensniveau erreicht, oder lege in den App-Einstellungen einen eigens für Sicherheitsprüfungen vorgesehenen Anbieter fest." + -- Text UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::DATAMODEL::ASSISTANTCOMPONENTTYPEEXTENSIONS::T1041509726"] = "Text" diff --git a/app/MindWork AI Studio/Plugins/languages/en-us-97dfb1ba-50c4-4440-8dfa-6575daf543c8/plugin.lua b/app/MindWork AI Studio/Plugins/languages/en-us-97dfb1ba-50c4-4440-8dfa-6575daf543c8/plugin.lua index fd325b8fe..f10e29773 100644 --- a/app/MindWork AI Studio/Plugins/languages/en-us-97dfb1ba-50c4-4440-8dfa-6575daf543c8/plugin.lua +++ b/app/MindWork AI Studio/Plugins/languages/en-us-97dfb1ba-50c4-4440-8dfa-6575daf543c8/plugin.lua @@ -48,47 +48,32 @@ LANG_NAME = "English (United States)" UI_TEXT_CONTENT = {} --- No audit provider is configured. -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITAGENT::T2034826200"] = "No audit provider is configured." - --- The security check could not be completed because the LLM's response was unusable. The audit level remains Unknown, so please try again later. -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITAGENT::T2451573087"] = "The security check could not be completed because the LLM's response was unusable. The audit level remains Unknown, so please try again later." - --- The security check could not be completed because the LLM's response was unusable. The audit level remains Unknown, so please try again later. -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITAGENT::T2451573087::INFORMAL"] = "The security check could not be completed because the LLM's response was unusable. The audit level remains Unknown, so please try again later." - --- The provider is not trusted enough for security checks. -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITAGENT::T2861409367"] = "The provider is not trusted enough for security checks." - --- The audit agent did not return a usable response. -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITAGENT::T3310188890"] = "The audit agent did not return a usable response." - --- No provider is configured for the Security Audit Agent. -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITAGENT::T3605554201"] = "No provider is configured for the Security Audit Agent." - --- The selected provider is not trusted enough for security checks. Pick one which meets the confidence required here, or choose a dedicated provider for security checks in the app settings. -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITAGENT::T4104574219"] = "The selected provider is not trusted enough for security checks. Pick one which meets the confidence required here, or choose a dedicated provider for security checks in the app settings." - --- The selected provider is not trusted enough for security checks. Pick one which meets the confidence required here, or choose a dedicated provider for security checks in the app settings. -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITAGENT::T4104574219::INFORMAL"] = "The selected provider is not trusted enough for security checks. Pick one which meets the confidence required here, or choose a dedicated provider for security checks in the app settings." - --- The audit result was empty. -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITAGENT::T432419958"] = "The audit result was empty." - --- The audit agent returned invalid JSON. -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITAGENT::T917600186"] = "The audit agent returned invalid JSON." - -- Concerning -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITLEVELEXTENSIONS::T1500095429"] = "Concerning" +UI_TEXT_CONTENT["AISTUDIO::AIOPERATIONS::PLUGINAUDIT::PLUGINAUDITLEVELEXTENSIONS::T1500095429"] = "Concerning" -- Dangerous -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITLEVELEXTENSIONS::T3421510547"] = "Dangerous" +UI_TEXT_CONTENT["AISTUDIO::AIOPERATIONS::PLUGINAUDIT::PLUGINAUDITLEVELEXTENSIONS::T3421510547"] = "Dangerous" -- Unknown -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITLEVELEXTENSIONS::T3424652889"] = "Unknown" +UI_TEXT_CONTENT["AISTUDIO::AIOPERATIONS::PLUGINAUDIT::PLUGINAUDITLEVELEXTENSIONS::T3424652889"] = "Unknown" -- Safe -UI_TEXT_CONTENT["AISTUDIO::AGENTS::ASSISTANTAUDIT::ASSISTANTAUDITLEVELEXTENSIONS::T760494712"] = "Safe" +UI_TEXT_CONTENT["AISTUDIO::AIOPERATIONS::PLUGINAUDIT::PLUGINAUDITLEVELEXTENSIONS::T760494712"] = "Safe" + +-- The security check could not be completed because the LLM's response was unusable. The audit level remains Unknown, so please try again later. +UI_TEXT_CONTENT["AISTUDIO::AIOPERATIONS::PLUGINAUDIT::PLUGINAUDITOPERATION::T2451573087"] = "The security check could not be completed because the LLM's response was unusable. The audit level remains Unknown, so please try again later." + +-- The security check could not be completed because the LLM's response was unusable. The audit level remains Unknown, so please try again later. +UI_TEXT_CONTENT["AISTUDIO::AIOPERATIONS::PLUGINAUDIT::PLUGINAUDITOPERATION::T2451573087::INFORMAL"] = "The security check could not be completed because the LLM's response was unusable. The audit level remains Unknown, so please try again later." + +-- The audit did not return a usable response. +UI_TEXT_CONTENT["AISTUDIO::AIOPERATIONS::PLUGINAUDIT::PLUGINAUDITOPERATION::T391654503"] = "The audit did not return a usable response." + +-- The audit result was empty. +UI_TEXT_CONTENT["AISTUDIO::AIOPERATIONS::PLUGINAUDIT::PLUGINAUDITOPERATION::T432419958"] = "The audit result was empty." + +-- The audit returned invalid JSON. +UI_TEXT_CONTENT["AISTUDIO::AIOPERATIONS::PLUGINAUDIT::PLUGINAUDITOPERATION::T678594297"] = "The audit returned invalid JSON." -- Objective UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::AGENDA::ASSISTANTAGENDA::T1121586136"] = "Objective" @@ -10254,8 +10239,8 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T1160768613"] = "The cont -- The content cleaner uses the model of this assistant. Please select one below. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T1160768613::INFORMAL"] = "The content cleaner uses the model of this assistant. Please select one below." --- The content is cleaned using an LLM agent: the main content is extracted, advertisements and other irrelevant things are attempted to be removed; relative links are attempted to be converted into absolute links so that they can be used. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T1164201762"] = "The content is cleaned using an LLM agent: the main content is extracted, advertisements and other irrelevant things are attempted to be removed; relative links are attempted to be converted into absolute links so that they can be used." +-- The content was loaded, but not cleaned: the model of the content cleaner gave no answer. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T1189712796"] = "The content was loaded, but not cleaned: the model of the content cleaner gave no answer." -- Fetch UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T1396322691"] = "Fetch" @@ -10266,12 +10251,21 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T2235427807"] = "Please p -- Please provide a URL to load the content from. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T2235427807::INFORMAL"] = "Please provide a URL to load the content from." +-- Your organization does not allow the selected model. Please select another model, or configure an eligible one in the app settings. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T2247340324"] = "Your organization does not allow the selected model. Please select another model, or configure an eligible one in the app settings." + +-- Your organization does not allow the selected model. Please select another model, or configure an eligible one in the app settings. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T2247340324::INFORMAL"] = "Your organization does not allow the selected model. Please select another model, or configure an eligible one in the app settings." + -- Loads the content from your URL. Does not work when the content is hidden behind a paywall. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T2672192696"] = "Loads the content from your URL. Does not work when the content is hidden behind a paywall." -- Loads the content from your URL. Does not work when the content is hidden behind a paywall. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T2672192696::INFORMAL"] = "Loads the content from your URL. Does not work when the content is hidden behind a paywall." +-- The text content cleaner, an AI task, extracts the main content, tries to remove advertisements and other clutter, and tries to turn relative links into absolute ones, so that they work. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T2765793850"] = "The text content cleaner, an AI task, extracts the main content, tries to remove advertisements and other clutter, and tries to turn relative links into absolute ones, so that they work." + -- URL from which to load the content UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T2883163022"] = "URL from which to load the content" @@ -10290,6 +10284,9 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T307442288"] = "Please pr -- Please provide a valid HTTP or HTTPS URL. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T307442288::INFORMAL"] = "Please provide a valid HTTP or HTTPS URL." +-- Clean up the content with AI? +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T3375295820"] = "Clean up the content with AI?" + -- No content cleaning UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T3588401674"] = "No content cleaning" @@ -10299,9 +10296,6 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T3825586228"] = "Please p -- Please provide a valid URL. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T3825586228::INFORMAL"] = "Please provide a valid URL." --- Clean up content by using an LLM agent? -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T4057255553"] = "Clean up content by using an LLM agent?" - -- Show web content options UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::READWEBCONTENT::T4249712357"] = "Show web content options" @@ -10353,6 +10347,12 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SELECTFILE::T4285779702"] = "Choose File" -- External Assistants rated below this audit level are treated as insufficiently reviewed. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T1162151451"] = "External Assistants rated below this audit level are treated as insufficiently reviewed." +-- Optionally choose a dedicated provider for assistant plugin audits. When left empty, AI Studio uses the app-wide default provider, or else the model you choose when auditing. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T1707650617"] = "Optionally choose a dedicated provider for assistant plugin audits. When left empty, AI Studio uses the app-wide default provider, or else the model you choose when auditing." + +-- Optionally choose a dedicated provider for assistant plugin audits. When left empty, AI Studio uses the app-wide default provider, or else the model you choose when auditing. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T1707650617::INFORMAL"] = "Optionally choose a dedicated provider for assistant plugin audits. When left empty, AI Studio uses the app-wide default provider, or else the model you choose when auditing." + -- Users may still activate plugins below the minimum Audit-Level UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T1840342259"] = "Users may still activate plugins below the minimum Audit-Level" @@ -10365,6 +10365,12 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDI -- External Assistants must be audited before activation UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T2065972970"] = "External Assistants must be audited before activation" +-- Before external assistants are activated, a model audits newly installed or updated ones for security risks. AI Studio keeps the latest audit card until the plugin manifest changes. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T2081939459"] = "Before external assistants are activated, a model audits newly installed or updated ones for security risks. AI Studio keeps the latest audit card until the plugin manifest changes." + +-- AI Task: Security Audit for external Assistants +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T2200966468"] = "AI Task: Security Audit for external Assistants" + -- Block activation below the minimum Audit-Level? UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T232834129"] = "Block activation below the minimum Audit-Level?" @@ -10374,8 +10380,14 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDI -- Disabling this setting turns off assistant plugin security audits. External assistants may then be activated and used even without a valid audit or after plugin changes. Do you really want to disable this protection? UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T2516645821::INFORMAL"] = "Disabling this setting turns off assistant plugin security audits. External assistants may then be activated and used even without a valid audit or after plugin changes. Do you really want to disable this protection?" --- Agent: Security Audit for external Assistants -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T2910364422"] = "Agent: Security Audit for external Assistants" +-- Automatic audits cannot run, because no model is available for security checks. Choose one above, or set an app-wide default provider in the app options. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T2857321563"] = "Automatic audits cannot run, because no model is available for security checks. Choose one above, or set an app-wide default provider in the app options." + +-- Automatic audits cannot run, because no model is available for security checks. Choose one above, or set an app-wide default provider in the app options. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T2857321563::INFORMAL"] = "Automatic audits cannot run, because no model is available for security checks. Choose one above, or set an app-wide default provider in the app options." + +-- Use the app default, otherwise the model chosen when auditing +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T2888830822"] = "Use the app default, otherwise the model chosen when auditing" -- External Assistant can be activated without an audit UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T2915620630"] = "External Assistant can be activated without an audit" @@ -10401,101 +10413,101 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDI -- Activation is blocked below the minimum Audit-Level UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T4041192469"] = "Activation is blocked below the minimum Audit-Level" --- Optionally choose a dedicated provider for assistant plugin audits. When left empty, AI Studio falls back to the app-wide default provider. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T4166969352"] = "Optionally choose a dedicated provider for assistant plugin audits. When left empty, AI Studio falls back to the app-wide default provider." +-- When enabled, you can preselect the model for this task and the confidence it needs. Without a preselected model, AI Studio uses the model of the assistant. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T1210631144"] = "When enabled, you can preselect the model for this task and the confidence it needs. Without a preselected model, AI Studio uses the model of the assistant." --- Optionally choose a dedicated provider for assistant plugin audits. When left empty, AI Studio falls back to the app-wide default provider. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T4166969352::INFORMAL"] = "Optionally choose a dedicated provider for assistant plugin audits. When left empty, AI Studio falls back to the app-wide default provider." +-- When enabled, you can preselect the model for this task and the confidence it needs. Without a preselected model, AI Studio uses the model of the assistant. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T1210631144::INFORMAL"] = "When enabled, you can preselect the model for this task and the confidence it needs. Without a preselected model, AI Studio uses the model of the assistant." --- This Agent audits newly installed or updated external Plugin-Assistant for security risks before they are activated and stores the latest audit card until the plugin manifest changes. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTASSISTANTAUDIT::T893652865"] = "This Agent audits newly installed or updated external Plugin-Assistant for security risks before they are activated and stores the latest audit card until the plugin manifest changes." +-- When an assistant loads content from the web, a model can clean it up: it extracts the main content, removes advertisements and other irrelevant things, and attempts to convert relative links into absolute links so that they can be used. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T1587139574"] = "When an assistant loads content from the web, a model can clean it up: it extracts the main content, removes advertisements and other irrelevant things, and attempts to convert relative links into absolute links so that they can be used." --- Use Case: this agent is used to clean up text content. It extracts the main content, removes advertisements and other irrelevant things, and attempts to convert relative links into absolute links so that they can be used. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T1299550589"] = "Use Case: this agent is used to clean up text content. It extracts the main content, removes advertisements and other irrelevant things, and attempts to convert relative links into absolute links so that they can be used." +-- Use the model of the assistant +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T2899245972"] = "Use the model of the assistant" --- Agent: Text Content Cleaner Options -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T3517268866"] = "Agent: Text Content Cleaner" +-- AI Task: Text Content Cleaner +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T3478589970"] = "AI Task: Text Content Cleaner" -- No options are preselected UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T354528094"] = "No options are preselected" --- When enabled, you can preselect some agent options. This might be useful when you prefer an LLM. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T3577764214"] = "When enabled, you can preselect some agent options. This might be useful when you prefer an LLM." - --- When enabled, you can preselect some agent options. This might be useful when you prefer an LLM. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T3577764214::INFORMAL"] = "When enabled, you can preselect some agent options. This might be useful when you prefer an LLM." - -- Preselect text content cleaner options? UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T3659087305"] = "Preselect text content cleaner options?" -- Options are preselected UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTCONTENTCLEANER::T3875604319"] = "Options are preselected" --- Use Case: this agent is used to select the appropriate data sources for the current prompt. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T2208143316"] = "Use Case: this agent is used to select the appropriate data sources for the current prompt." +-- AI Task: Data Source Selection +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T1227800581"] = "AI Task: Data Source Selection" --- Agent: Data Source Selection Options -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T2258031949"] = "Agent: Data Source Selection" +-- When enabled, you can preselect the model for this task and the confidence it needs. Without a preselected model, AI Studio uses the model of the chat. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T2513220366"] = "When enabled, you can preselect the model for this task and the confidence it needs. Without a preselected model, AI Studio uses the model of the chat." + +-- When enabled, you can preselect the model for this task and the confidence it needs. Without a preselected model, AI Studio uses the model of the chat. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T2513220366::INFORMAL"] = "When enabled, you can preselect the model for this task and the confidence it needs. Without a preselected model, AI Studio uses the model of the chat." + +-- In classic RAG, which searches the data sources with every message, a model first selects the data sources which fit the current prompt. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T2522862914"] = "In classic RAG, which searches the data sources with every message, a model first selects the data sources which fit the current prompt." + +-- Use the model of the chat +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T3435835378"] = "Use the model of the chat" -- No options are preselected UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T354528094"] = "No options are preselected" --- When enabled, you can preselect some agent options. This might be useful when you prefer an LLM. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T3577764214"] = "When enabled, you can preselect some agent options. This might be useful when you prefer an LLM." - --- When enabled, you can preselect some agent options. This might be useful when you prefer an LLM. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T3577764214::INFORMAL"] = "When enabled, you can preselect some agent options. This might be useful when you prefer an LLM." - -- Options are preselected UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T3875604319"] = "Options are preselected" -- Preselect data source selection options? UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTDATASOURCESELECTION::T991598424"] = "Preselect data source selection options?" --- Use Case: this agent is used to validate any retrieval context of any retrieval process. Perhaps there are many of these retrieval contexts and you want to validate them all. Therefore, you might want to use a cheap and fast LLM for this job. When using a local or self-hosted LLM, look for a small (e.g. 3B) and fast model. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T1326813386"] = "Use Case: this agent is used to validate any retrieval context of any retrieval process. Perhaps there are many of these retrieval contexts and you want to validate them all. Therefore, you might want to use a cheap and fast LLM for this job. When using a local or self-hosted LLM, look for a small (e.g. 3B) and fast model." +-- Each validation is a request of its own, so more simultaneous validations mean as many simultaneous requests. Some providers limit the number of requests per minute. When you are unsure, choose a low setting between 1 and 6 validations. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T1490986595"] = "Each validation is a request of its own, so more simultaneous validations mean as many simultaneous requests. Some providers limit the number of requests per minute. When you are unsure, choose a low setting between 1 and 6 validations." --- Use Case: this agent is used to validate any retrieval context of any retrieval process. Perhaps there are many of these retrieval contexts and you want to validate them all. Therefore, you might want to use a cheap and fast LLM for this job. When using a local or self-hosted LLM, look for a small (e.g. 3B) and fast model. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T1326813386::INFORMAL"] = "Use Case: this agent is used to validate any retrieval context of any retrieval process. Perhaps there are many of these retrieval contexts and you want to validate them all. Therefore, you might want to use a cheap and fast LLM for this job. When using a local or self-hosted LLM, look for a small (e.g. 3B) and fast model." +-- Each validation is a request of its own, so more simultaneous validations mean as many simultaneous requests. Some providers limit the number of requests per minute. When you are unsure, choose a low setting between 1 and 6 validations. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T1490986595::INFORMAL"] = "Each validation is a request of its own, so more simultaneous validations mean as many simultaneous requests. Some providers limit the number of requests per minute. When you are unsure, choose a low setting between 1 and 6 validations." --- The validation agent is enabled -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T2274149855"] = "The validation agent is enabled" +-- AI Task: Retrieval Context Validation +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T1717726852"] = "AI Task: Retrieval Context Validation" --- Enable the retrieval context validation agent? -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T2663872937"] = "Enable the retrieval context validation agent?" +-- How many validations should run simultaneously? +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T2326205445"] = "How many validations should run simultaneously?" + +-- When enabled, a model checks each retrieval context of classic RAG, whether it makes sense for the given prompt. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T240073404"] = "When enabled, a model checks each retrieval context of classic RAG, whether it makes sense for the given prompt." + +-- Validate the retrieval contexts? +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T2428915017"] = "Validate the retrieval contexts?" + +-- When enabled, you can preselect the model for this task, the confidence it needs, and how many validations run simultaneously. Without a preselected model, AI Studio uses the model of the chat. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T2520295642"] = "When enabled, you can preselect the model for this task, the confidence it needs, and how many validations run simultaneously. Without a preselected model, AI Studio uses the model of the chat." + +-- When enabled, you can preselect the model for this task, the confidence it needs, and how many validations run simultaneously. Without a preselected model, AI Studio uses the model of the chat. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T2520295642::INFORMAL"] = "When enabled, you can preselect the model for this task, the confidence it needs, and how many validations run simultaneously. Without a preselected model, AI Studio uses the model of the chat." -- Preselect retrieval context validation options? UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T2663938643"] = "Preselect retrieval context validation options?" --- agents -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T2669785679"] = "agents" - --- When enabled, the retrieval context validation agent will check each retrieval context of any retrieval process, whether a context makes sense for the given prompt. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T298440039"] = "When enabled, the retrieval context validation agent will check each retrieval context of any retrieval process, whether a context makes sense for the given prompt." - --- How many validation agents should work simultaneously? -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T3431541788"] = "How many validation agents should work simultaneously?" +-- Use the model of the chat +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T3435835378"] = "Use the model of the chat" -- No options are preselected UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T354528094"] = "No options are preselected" --- When enabled, you can preselect some agent options. This might be useful when you prefer an LLM. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T3577764214"] = "When enabled, you can preselect some agent options. This might be useful when you prefer an LLM." - --- When enabled, you can preselect some agent options. This might be useful when you prefer an LLM. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T3577764214::INFORMAL"] = "When enabled, you can preselect some agent options. This might be useful when you prefer an LLM." - --- More active agents also mean that a corresponding number of requests are made simultaneously. Some providers limit the number of requests per minute. When you are unsure, choose a low setting between 1 to 6 agents. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T3819544890"] = "More active agents also mean that a corresponding number of requests are made simultaneously. Some providers limit the number of requests per minute. When you are unsure, choose a low setting between 1 to 6 agents." - --- More active agents also mean that a corresponding number of requests are made simultaneously. Some providers limit the number of requests per minute. When you are unsure, choose a low setting between 1 to 6 agents. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T3819544890::INFORMAL"] = "More active agents also mean that a corresponding number of requests are made simultaneously. Some providers limit the number of requests per minute. When you are unsure, choose a low setting between 1 to 6 agents." - -- Options are preselected UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T3875604319"] = "Options are preselected" --- Agent: Retrieval Context Validation Options -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T928989804"] = "Agent: Retrieval Context Validation" +-- validations +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T595734827"] = "validations" + +-- Each retrieval context is validated +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T705018823"] = "Each retrieval context is validated" + +-- In classic RAG, a model checks each retrieval context, i.e., each passage found in the data sources, whether it fits the current prompt. There can be many of them, so you might want to use a cheap and fast model for this job. When using a local or self-hosted model, look for a small (e.g., 3B) and fast one. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T765642962"] = "In classic RAG, a model checks each retrieval context, i.e., each passage found in the data sources, whether it fits the current prompt. There can be many of them, so you might want to use a cheap and fast model for this job. When using a local or self-hosted model, look for a small (e.g., 3B) and fast one." + +-- In classic RAG, a model checks each retrieval context, i.e., each passage found in the data sources, whether it fits the current prompt. There can be many of them, so you might want to use a cheap and fast model for this job. When using a local or self-hosted model, look for a small (e.g., 3B) and fast one. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T765642962::INFORMAL"] = "In classic RAG, a model checks each retrieval context, i.e., each passage found in the data sources, whether it fits the current prompt. There can be many of them, so you might want to use a cheap and fast model for this job. When using a local or self-hosted model, look for a small (e.g., 3B) and fast one." -- No validation is performed UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAGENTRETRIEVALCONTEXTVALIDATION::T95175095"] = "No validation is performed" @@ -10509,6 +10521,12 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAPP::T1118505044"] -- Do you want to show preview features in the app? UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAPP::T1118505044::INFORMAL"] = "Do you want to show preview features in the app?" +-- When enabled, requests to self-hosted providers and LiteLLM name the feature that sent them, e.g., the chat, an assistant, or an AI task, together with the version of AI Studio and your operating system. This lets the operators of these servers, usually your organization, see which features are used. Cloud providers never receive these details, and AI Studio never sends anything to its developers. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAPP::T1140234771"] = "When enabled, requests to self-hosted providers and LiteLLM name the feature that sent them, e.g., the chat, an assistant, or an AI task, together with the version of AI Studio and your operating system. This lets the operators of these servers, usually your organization, see which features are used. Cloud providers never receive these details, and AI Studio never sends anything to its developers." + +-- When enabled, requests to self-hosted providers and LiteLLM name the feature that sent them, e.g., the chat, an assistant, or an AI task, together with the version of AI Studio and your operating system. This lets the operators of these servers, usually your organization, see which features are used. Cloud providers never receive these details, and AI Studio never sends anything to its developers. +UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAPP::T1140234771::INFORMAL"] = "When enabled, requests to self-hosted providers and LiteLLM name the feature that sent them, e.g., the chat, an assistant, or an AI task, together with the version of AI Studio and your operating system. This lets the operators of these servers, usually your organization, see which features are used. Cloud providers never receive these details, and AI Studio never sends anything to its developers." + -- AI Studio cannot check for updates when running as a Flatpak. Updates are managed outside the app. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAPP::T1190632518"] = "AI Studio cannot check for updates when running as a Flatpak. Updates are managed outside the app." @@ -10614,12 +10632,6 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAPP::T1907446663"] -- Select the language for the app. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAPP::T1907446663::INFORMAL"] = "Select the language for the app." --- When enabled, requests to self-hosted providers and LiteLLM name the feature that sent them, e.g., the chat, an assistant, or an agent, together with the version of AI Studio and your operating system. This lets the operators of these servers, usually your organization, see which features are used. Cloud providers never receive these details, and AI Studio never sends anything to its developers. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAPP::T1907749697"] = "When enabled, requests to self-hosted providers and LiteLLM name the feature that sent them, e.g., the chat, an assistant, or an agent, together with the version of AI Studio and your operating system. This lets the operators of these servers, usually your organization, see which features are used. Cloud providers never receive these details, and AI Studio never sends anything to its developers." - --- When enabled, requests to self-hosted providers and LiteLLM name the feature that sent them, e.g., the chat, an assistant, or an agent, together with the version of AI Studio and your operating system. This lets the operators of these servers, usually your organization, see which features are used. Cloud providers never receive these details, and AI Studio never sends anything to its developers. -UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAPP::T1907749697::INFORMAL"] = "When enabled, requests to self-hosted providers and LiteLLM name the feature that sent them, e.g., the chat, an assistant, or an agent, together with the version of AI Studio and your operating system. This lets the operators of these servers, usually your organization, see which features are used. Cloud providers never receive these details, and AI Studio never sends anything to its developers." - -- Your organization has disabled update checks and installations. UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELAPP::T1909339369"] = "Your organization has disabled update checks and installations." @@ -11925,6 +11937,12 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T193192210"] = " -- null UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T1996966820"] = "null" +-- The model set for security checks no longer exists. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T2001789726"] = "The model set for security checks no longer exists. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings." + +-- The model set for security checks no longer exists. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T2001789726::INFORMAL"] = "The model set for security checks no longer exists. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings." + -- Properties UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T2177370620"] = "Properties" @@ -11943,9 +11961,27 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T273798258"] = " -- Size UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T2789707388"] = "Size" +-- Your organization does not allow the model set for security checks. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T2882229141"] = "Your organization does not allow the model set for security checks. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings." + +-- Your organization does not allow the model set for security checks. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T2882229141::INFORMAL"] = "Your organization does not allow the model set for security checks. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings." + +-- The model set for security checks is not trusted enough for them. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T2917601715"] = "The model set for security checks is not trusted enough for them. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings." + +-- The model set for security checks is not trusted enough for them. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T2917601715::INFORMAL"] = "The model set for security checks is not trusted enough for them. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings." + -- No model configured UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T2941224401"] = "No model configured" +-- No model is set for security checks, neither for this AI task nor for the app as a whole. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T3013234535"] = "No model is set for security checks, neither for this AI task nor for the app as a whole. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings." + +-- No model is set for security checks, neither for this AI task nor for the app as a whole. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T3013234535::INFORMAL"] = "No model is set for security checks, neither for this AI task nor for the app as a whole. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings." + -- Prompt: set UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T3156437951"] = "Prompt: set" @@ -12003,12 +12039,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T521056824::INFO -- Audit model UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T532102309"] = "Audit model" --- No model is set for security checks, neither for this agent nor for the app as a whole. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings. -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T614645381"] = "No model is set for security checks, neither for this agent nor for the app as a whole. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings." - --- No model is set for security checks, neither for this agent nor for the app as a whole. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings. -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T614645381::INFORMAL"] = "No model is set for security checks, neither for this agent nor for the app as a whole. Choose one here to check this plugin. Your choice applies to this check only; you can set a permanent one in the app settings." - -- System Prompt UI_TEXT_CONTENT["AISTUDIO::DIALOGS::ASSISTANTPLUGINAUDITDIALOG::T628396066"] = "System Prompt" @@ -16593,9 +16623,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGJOBPOSTINGS::T386176 -- When enabled, you can preselect some job posting options. This might be useful when you prefer a specific LLM model. UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGJOBPOSTINGS::T3861766667::INFORMAL"] = "When enabled, you can preselect some job posting options. This might be useful when you prefer a specific LLM model." --- Content cleaner agent is preselected -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T1013787967"] = "Content cleaner agent is preselected" - -- Web content reader is shown UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T1030372436"] = "Web content reader is shown" @@ -16623,8 +16650,11 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T1766361 -- Choose whether the assistant should use the app default profile, no profile, or a specific profile. UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T1766361623::INFORMAL"] = "Choose whether the assistant should use the app default profile, no profile, or a specific profile." --- Content cleaner agent is not preselected -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T1969816694"] = "Content cleaner agent is not preselected" +-- When enabled, the text content cleaner is preselected. This might be useful when you prefer to clean up the legal content before translating it. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T1958081245"] = "When enabled, the text content cleaner is preselected. This might be useful when you prefer to clean up the legal content before translating it." + +-- When enabled, the text content cleaner is preselected. This might be useful when you prefer to clean up the legal content before translating it. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T1958081245::INFORMAL"] = "When enabled, the text content cleaner is preselected. This might be useful when you prefer to clean up the legal content before translating it." -- When enabled, the web content reader is preselected. This might be useful when you prefer to load legal content from the web very often. UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T1993094764"] = "When enabled, the web content reader is preselected. This might be useful when you prefer to load legal content from the web very often." @@ -16644,27 +16674,27 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T2529161 -- Web content reader is hidden UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T2799795311"] = "Web content reader is hidden" +-- Text content cleaner is not preselected +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T284131714"] = "Text content cleaner is not preselected" + +-- Preselect the text content cleaner? +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T2981779520"] = "Preselect the text content cleaner?" + -- Close UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T3448155331"] = "Close" -- Web content reader is preselected UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T3641773985"] = "Web content reader is preselected" --- Preselect the content cleaner agent? -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T3649428096"] = "Preselect the content cleaner agent?" - -- Assistant: Legal Check Options UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T4033382756"] = "Assistant: Legal Check Options" --- When enabled, the content cleaner agent is preselected. This might be useful when you prefer to clean up the legal content before translating it. -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T4049873385"] = "When enabled, the content cleaner agent is preselected. This might be useful when you prefer to clean up the legal content before translating it." - --- When enabled, the content cleaner agent is preselected. This might be useful when you prefer to clean up the legal content before translating it. -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T4049873385::INFORMAL"] = "When enabled, the content cleaner agent is preselected. This might be useful when you prefer to clean up the legal content before translating it." - -- Preselect the web content reader? UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T629158142"] = "Preselect the web content reader?" +-- Text content cleaner is preselected +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGLEGALCHECK::T845988899"] = "Text content cleaner is preselected" + -- No preset preselected UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGMODELCOMPARISON::T1028082569"] = "No preset preselected" @@ -17103,9 +17133,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSLIDEBUILDER::T99564 -- A slide holds at most this many bullet points, in all of its text slots together. Match it to the room for text in the layouts of your template. UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSLIDEBUILDER::T995644230::INFORMAL"] = "A slide holds at most this many bullet points, in all of its text slots together. Match it to the room for text in the layouts of your template." --- Content cleaner agent is preselected -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T1013787967"] = "Content cleaner agent is preselected" - -- Web content reader is shown UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T1030372436"] = "Web content reader is shown" @@ -17121,9 +17148,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T16331 -- Web content reader is not preselected UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T1701127912"] = "Web content reader is not preselected" --- Content cleaner agent is not preselected -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T1969816694"] = "Content cleaner agent is not preselected" - -- Hide the web content reader? UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T2090693677"] = "Hide the web content reader?" @@ -17133,21 +17157,27 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T21718 -- No SWOT analysis options are preselected UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T2361666775"] = "No SWOT analysis options are preselected" +-- When enabled, the text content cleaner is preselected for cleaning website content before it is analyzed. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T2429021439"] = "When enabled, the text content cleaner is preselected for cleaning website content before it is analyzed." + -- Preselect SWOT analysis options? UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T2593950994"] = "Preselect SWOT analysis options?" -- Web content reader is hidden UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T2799795311"] = "Web content reader is hidden" +-- Text content cleaner is not preselected +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T284131714"] = "Text content cleaner is not preselected" + +-- Preselect the text content cleaner? +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T2981779520"] = "Preselect the text content cleaner?" + -- When enabled, the web content reader is preselected. This is useful when you often analyze content from websites. UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T3088856907"] = "When enabled, the web content reader is preselected. This is useful when you often analyze content from websites." -- When enabled, the web content reader is preselected. This is useful when you often analyze content from websites. UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T3088856907::INFORMAL"] = "When enabled, the web content reader is preselected. This is useful when you often analyze content from websites." --- When enabled, the content cleaner agent is preselected for cleaning website content before it is analyzed. -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T332064979"] = "When enabled, the content cleaner agent is preselected for cleaning website content before it is analyzed." - -- Close UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T3448155331"] = "Close" @@ -17157,9 +17187,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T35473 -- Web content reader is preselected UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T3641773985"] = "Web content reader is preselected" --- Preselect the content cleaner agent? -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T3649428096"] = "Preselect the content cleaner agent?" - -- Specify topics the SWOT analysis should pay particular attention to. UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T3857591121"] = "Specify topics the SWOT analysis should pay particular attention to." @@ -17175,6 +17202,9 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T62915 -- Preselect an analysis focus UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T656094797"] = "Preselect an analysis focus" +-- Text content cleaner is preselected +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T845988899"] = "Text content cleaner is preselected" + -- When enabled, you can preselect the SWOT analysis options. This is useful when you prefer a specific language, analysis focus, or LLM. UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSWOTANALYSIS::T975761680"] = "When enabled, you can preselect the SWOT analysis options. This is useful when you prefer a specific language, analysis focus, or LLM." @@ -17211,9 +17241,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSYNONYMS::T388911788 -- Preselect synonym options? UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGSYNONYMS::T4170921846"] = "Preselect synonym options?" --- Content cleaner agent is preselected -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T1013787967"] = "Content cleaner agent is preselected" - -- Web content reader is shown UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T1030372436"] = "Web content reader is shown" @@ -17229,12 +17256,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T141 -- Preselect another target language UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T1462295644"] = "Preselect another target language" --- When enabled, the content cleaner agent is preselected. This might be useful when you prefer to clean up the content before summarizing it. -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T154694569"] = "When enabled, the content cleaner agent is preselected. This might be useful when you prefer to clean up the content before summarizing it." - --- When enabled, the content cleaner agent is preselected. This might be useful when you prefer to clean up the content before summarizing it. -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T154694569::INFORMAL"] = "When enabled, the content cleaner agent is preselected. This might be useful when you prefer to clean up the content before summarizing it." - -- When activated, the web content reader is hidden and cannot be used. As a result, the user interface becomes a bit easier to use. UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T1633101895"] = "When activated, the web content reader is hidden and cannot be used. As a result, the user interface becomes a bit easier to use." @@ -17244,9 +17265,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T170 -- Assistant: Text Summarizer Options UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T1767527569"] = "Assistant: Text Summarizer Options" --- Content cleaner agent is not preselected -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T1969816694"] = "Content cleaner agent is not preselected" - -- Hide the web content reader? UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T2090693677"] = "Hide the web content reader?" @@ -17262,6 +17280,12 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T244 -- Web content reader is hidden UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T2799795311"] = "Web content reader is hidden" +-- Text content cleaner is not preselected +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T284131714"] = "Text content cleaner is not preselected" + +-- Preselect the text content cleaner? +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T2981779520"] = "Preselect the text content cleaner?" + -- No summarizer options are preselected UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T3215334223"] = "No summarizer options are preselected" @@ -17280,12 +17304,15 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T354 -- Web content reader is preselected UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T3641773985"] = "Web content reader is preselected" --- Preselect the content cleaner agent? -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T3649428096"] = "Preselect the content cleaner agent?" - -- Preselect important aspects UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T3705987833"] = "Preselect important aspects" +-- When enabled, the text content cleaner is preselected. This might be useful when you prefer to clean up the content before summarizing it. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T402180229"] = "When enabled, the text content cleaner is preselected. This might be useful when you prefer to clean up the content before summarizing it." + +-- When enabled, the text content cleaner is preselected. This might be useful when you prefer to clean up the content before summarizing it. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T402180229::INFORMAL"] = "When enabled, the text content cleaner is preselected. This might be useful when you prefer to clean up the content before summarizing it." + -- Which summarizer complexity should be preselected? UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T408530182"] = "Which summarizer complexity should be preselected?" @@ -17301,8 +17328,8 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T511 -- Preselect the web content reader? UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T629158142"] = "Preselect the web content reader?" --- Content cleaner agent is preselected -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T1013787967"] = "Content cleaner agent is preselected" +-- Text content cleaner is preselected +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTEXTSUMMARIZER::T845988899"] = "Text content cleaner is preselected" -- Assistant: Translator Options UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T1016384269"] = "Assistant: Translator Options" @@ -17328,8 +17355,11 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T170112 -- Live translation is not preselected UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T1825690873"] = "Live translation is not preselected" --- Content cleaner agent is not preselected -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T1969816694"] = "Content cleaner agent is not preselected" +-- When enabled, the text content cleaner is preselected. This might be useful when you prefer to clean up the content before translating it. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T1936357390"] = "When enabled, the text content cleaner is preselected. This might be useful when you prefer to clean up the content before translating it." + +-- When enabled, the text content cleaner is preselected. This might be useful when you prefer to clean up the content before translating it. +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T1936357390::INFORMAL"] = "When enabled, the text content cleaner is preselected. This might be useful when you prefer to clean up the content before translating it." -- Preselect translator options? UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T1989346399"] = "Preselect translator options?" @@ -17346,9 +17376,15 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T243574 -- Web content reader is hidden UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T2799795311"] = "Web content reader is hidden" +-- Text content cleaner is not preselected +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T284131714"] = "Text content cleaner is not preselected" + -- No translator options are preselected UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T2866358796"] = "No translator options are preselected" +-- Preselect the text content cleaner? +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T2981779520"] = "Preselect the text content cleaner?" + -- Close UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T3448155331"] = "Close" @@ -17364,9 +17400,6 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T354826 -- Web content reader is preselected UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T3641773985"] = "Web content reader is preselected" --- Preselect the content cleaner agent? -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T3649428096"] = "Preselect the content cleaner agent?" - -- When enabled, you can preselect the translator options. This might be useful when you prefer a specific target language or LLM model. UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T4195511669"] = "When enabled, you can preselect the translator options. This might be useful when you prefer a specific target language or LLM model." @@ -17376,11 +17409,8 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T419551 -- Preselect the web content reader? UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T629158142"] = "Preselect the web content reader?" --- When enabled, the content cleaner agent is preselected. This might be useful when you prefer to clean up the content before translating it. -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T82436938"] = "When enabled, the content cleaner agent is preselected. This might be useful when you prefer to clean up the content before translating it." - --- When enabled, the content cleaner agent is preselected. This might be useful when you prefer to clean up the content before translating it. -UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T82436938::INFORMAL"] = "When enabled, the content cleaner agent is preselected. This might be useful when you prefer to clean up the content before translating it." +-- Text content cleaner is preselected +UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T845988899"] = "Text content cleaner is preselected" -- How fast should the live translation react? UI_TEXT_CONTENT["AISTUDIO::DIALOGS::SETTINGS::SETTINGSDIALOGTRANSLATION::T884246296"] = "How fast should the live translation react?" @@ -18180,12 +18210,6 @@ UI_TEXT_CONTENT["AISTUDIO::PAGES::ASSISTANTS::T3011450657"] = "My Tasks" -- E-Mail UI_TEXT_CONTENT["AISTUDIO::PAGES::ASSISTANTS::T3026443472"] = "E-Mail" --- The automatic security audit for the assistant plugin '{0}' failed. Please run it manually from the plugins page. -UI_TEXT_CONTENT["AISTUDIO::PAGES::ASSISTANTS::T311775455"] = "The automatic security audit for the assistant plugin '{0}' failed. Please run it manually from the plugins page." - --- The automatic security audit for the assistant plugin '{0}' failed. Please run it manually from the plugins page. -UI_TEXT_CONTENT["AISTUDIO::PAGES::ASSISTANTS::T311775455::INFORMAL"] = "The automatic security audit for the assistant plugin '{0}' failed. Please run it manually from the plugins page." - -- Translate AI Studio text content into other languages UI_TEXT_CONTENT["AISTUDIO::PAGES::ASSISTANTS::T3181803840"] = "Translate AI Studio text content into other languages" @@ -19512,12 +19536,6 @@ UI_TEXT_CONTENT["AISTUDIO::PAGES::PLUGINS::T3974628410"] = "Please drop only one -- Please drop only one plugin archive at a time. UI_TEXT_CONTENT["AISTUDIO::PAGES::PLUGINS::T3974628410::INFORMAL"] = "Please drop only one plugin archive at a time." --- The automatic security audit for the assistant plugin '{0}' failed. Please run it manually. -UI_TEXT_CONTENT["AISTUDIO::PAGES::PLUGINS::T4066679817"] = "The automatic security audit for the assistant plugin '{0}' failed. Please run it manually." - --- The automatic security audit for the assistant plugin '{0}' failed. Please run it manually. -UI_TEXT_CONTENT["AISTUDIO::PAGES::PLUGINS::T4066679817::INFORMAL"] = "The automatic security audit for the assistant plugin '{0}' failed. Please run it manually." - -- The assistant plugin '{0}' has been successfully revised. UI_TEXT_CONTENT["AISTUDIO::PAGES::PLUGINS::T4157246824"] = "The assistant plugin '{0}' has been successfully revised." @@ -21543,6 +21561,54 @@ UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLAINFILEEXPORT::T1713926719"] = "The export s -- The export failed. UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLAINFILEEXPORT::T1895034475"] = "The export failed." +-- The organization does not allow the provider for security checks. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T1679509394"] = "The organization does not allow the provider for security checks." + +-- AI Studio did not audit new or updated assistant plugins automatically, because no model is set for security checks, and there is no app-wide default either. Choose a model for security checks in the settings. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T1994155532"] = "AI Studio did not audit new or updated assistant plugins automatically, because no model is set for security checks, and there is no app-wide default either. Choose a model for security checks in the settings." + +-- AI Studio did not audit new or updated assistant plugins automatically, because no model is set for security checks, and there is no app-wide default either. Choose a model for security checks in the settings. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T1994155532::INFORMAL"] = "AI Studio did not audit new or updated assistant plugins automatically, because no model is set for security checks, and there is no app-wide default either. Choose a model for security checks in the settings." + +-- No audit provider is configured. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T2034826200"] = "No audit provider is configured." + +-- Your organization does not allow the provider for security checks. Pick another one, or choose a dedicated provider for security checks in the app settings. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T2109782167"] = "Your organization does not allow the provider for security checks. Pick another one, or choose a dedicated provider for security checks in the app settings." + +-- Your organization does not allow the provider for security checks. Pick another one, or choose a dedicated provider for security checks in the app settings. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T2109782167::INFORMAL"] = "Your organization does not allow the provider for security checks. Pick another one, or choose a dedicated provider for security checks in the app settings." + +-- The provider is not trusted enough for security checks. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T2861409367"] = "The provider is not trusted enough for security checks." + +-- The automatic security audit for the assistant plugin '{0}' failed. Please run it manually on the plugins page. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T3322815862"] = "The automatic security audit for the assistant plugin '{0}' failed. Please run it manually on the plugins page." + +-- The automatic security audit for the assistant plugin '{0}' failed. Please run it manually on the plugins page. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T3322815862::INFORMAL"] = "The automatic security audit for the assistant plugin '{0}' failed. Please run it manually on the plugins page." + +-- AI Studio did not audit new or updated assistant plugins automatically, because the model for security checks is not trusted enough. Choose another one in the settings. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T3336137740"] = "AI Studio did not audit new or updated assistant plugins automatically, because the model for security checks is not trusted enough. Choose another one in the settings." + +-- AI Studio did not audit new or updated assistant plugins automatically, because the model for security checks is not trusted enough. Choose another one in the settings. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T3336137740::INFORMAL"] = "AI Studio did not audit new or updated assistant plugins automatically, because the model for security checks is not trusted enough. Choose another one in the settings." + +-- No provider is configured for security checks. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T3445977179"] = "No provider is configured for security checks." + +-- AI Studio did not audit new or updated assistant plugins automatically, because your organization does not allow the model for security checks. Choose another one in the settings. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T399386793"] = "AI Studio did not audit new or updated assistant plugins automatically, because your organization does not allow the model for security checks. Choose another one in the settings." + +-- AI Studio did not audit new or updated assistant plugins automatically, because your organization does not allow the model for security checks. Choose another one in the settings. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T399386793::INFORMAL"] = "AI Studio did not audit new or updated assistant plugins automatically, because your organization does not allow the model for security checks. Choose another one in the settings." + +-- The selected provider is not trusted enough for security checks. Pick one which meets the confidence required here, or choose a dedicated provider for security checks in the app settings. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T4104574219"] = "The selected provider is not trusted enough for security checks. Pick one which meets the confidence required here, or choose a dedicated provider for security checks in the app settings." + +-- The selected provider is not trusted enough for security checks. Pick one which meets the confidence required here, or choose a dedicated provider for security checks in the app settings. +UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::ASSISTANTPLUGINAUDITSERVICE::T4104574219::INFORMAL"] = "The selected provider is not trusted enough for security checks. Pick one which meets the confidence required here, or choose a dedicated provider for security checks in the app settings." + -- Text UI_TEXT_CONTENT["AISTUDIO::TOOLS::PLUGINSYSTEM::ASSISTANTS::DATAMODEL::ASSISTANTCOMPONENTTYPEEXTENSIONS::T1041509726"] = "Text" diff --git a/app/MindWork AI Studio/Program.cs b/app/MindWork AI Studio/Program.cs index 3c6eb28c2..27cdae424 100644 --- a/app/MindWork AI Studio/Program.cs +++ b/app/MindWork AI Studio/Program.cs @@ -1,5 +1,8 @@ -using AIStudio.Agents; -using AIStudio.Agents.AssistantAudit; +using AIStudio.AIOperations; +using AIStudio.AIOperations.DataSourceChoice; +using AIStudio.AIOperations.PluginAudit; +using AIStudio.AIOperations.RetrievalContextValidation; +using AIStudio.AIOperations.TextContentCleaning; using AIStudio.Assistants.BeyondFactsLab; using AIStudio.Assistants.ModelComparison; using AIStudio.Assistants.VisualBriefing; @@ -260,10 +263,11 @@ internal sealed class Program // Stateless: every method works on its arguments alone, so one instance serves everyone. builder.Services.AddSingleton(); - builder.Services.AddTransient(); - builder.Services.AddTransient(); - builder.Services.AddTransient(); - builder.Services.AddTransient(); + builder.Services.AddSingleton(); + builder.Services.AddSingleton(); + builder.Services.AddSingleton(); + builder.Services.AddSingleton(); + builder.Services.AddSingleton(); builder.Services.AddTransient(); builder.Services.AddHostedService(); builder.Services.AddHostedService(); diff --git a/app/MindWork AI Studio/Settings/ChatTemplate.cs b/app/MindWork AI Studio/Settings/ChatTemplate.cs index 99955b93c..da08293c5 100644 --- a/app/MindWork AI Studio/Settings/ChatTemplate.cs +++ b/app/MindWork AI Studio/Settings/ChatTemplate.cs @@ -63,7 +63,7 @@ public record ChatTemplate( /// /// Null means the template says nothing, so the chat starts with the data source defaults from /// the app settings. Anything else is the template's own answer, and it carries more than a - /// list of sources: whether data sources are used at all, whether an agent picks them, and + /// list of sources: whether data sources are used at all, whether an AI operation picks them, and /// whether the retrieved data is validated. /// public DataSourceOptions? DataSourceOptions { get; set; } @@ -202,7 +202,7 @@ public record ChatTemplate( /// /// /// The two sides are not equally expressive: a launcher can only ever say "these sources, picked - /// by hand", while a chat template carries the whole options and can also say "let an agent pick + /// by hand", while a chat template carries the whole options and can also say "let an AI operation pick /// them for each message". Mixing them field by field would produce something neither of them /// asked for, so the template wins as a whole. /// diff --git a/app/MindWork AI Studio/Settings/ConfigurationSelectDataFactory.cs b/app/MindWork AI Studio/Settings/ConfigurationSelectDataFactory.cs index ddd5be3ab..8fe1ce71a 100644 --- a/app/MindWork AI Studio/Settings/ConfigurationSelectDataFactory.cs +++ b/app/MindWork AI Studio/Settings/ConfigurationSelectDataFactory.cs @@ -6,7 +6,7 @@ using AIStudio.Assistants.SlideBuilder; using AIStudio.Assistants.TextSummarizer; using AIStudio.Assistants.EMail; using AIStudio.Provider; -using AIStudio.Agents.AssistantAudit; +using AIStudio.AIOperations.PluginAudit; using AIStudio.Settings.DataModel; using AIStudio.Tools.PluginSystem; @@ -400,11 +400,11 @@ public static class ConfigurationSelectDataFactory yield return new(theme.Name, theme); } - public static IEnumerable> GetAssistantAuditLevelsData() + public static IEnumerable> GetAssistantAuditLevelsData() { - foreach (var level in Enum.GetValues()) + foreach (var level in Enum.GetValues()) { - if (level == AssistantAuditLevel.UNKNOWN) + if (level == PluginAuditLevel.UNKNOWN) continue; yield return new(level.Name, level); diff --git a/app/MindWork AI Studio/Settings/DataModel/Data.cs b/app/MindWork AI Studio/Settings/DataModel/Data.cs index ae37b8282..f5d32bb69 100644 --- a/app/MindWork AI Studio/Settings/DataModel/Data.cs +++ b/app/MindWork AI Studio/Settings/DataModel/Data.cs @@ -48,7 +48,7 @@ public sealed class Data /// /// /// 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); diff --git a/app/MindWork AI Studio/Settings/DataModel/DataAgentDataSourceSelection.cs b/app/MindWork AI Studio/Settings/DataModel/DataAgentDataSourceSelection.cs index 1e2ad3d25..10007b5b6 100644 --- a/app/MindWork AI Studio/Settings/DataModel/DataAgentDataSourceSelection.cs +++ b/app/MindWork AI Studio/Settings/DataModel/DataAgentDataSourceSelection.cs @@ -1,5 +1,7 @@ using System.Linq.Expressions; +using AIStudio.Provider; + namespace AIStudio.Settings.DataModel; public sealed class DataAgentDataSourceSelection(Expression>? configSelection = null) @@ -20,4 +22,12 @@ public sealed class DataAgentDataSourceSelection(Expression public string PreselectedAgentProvider { get; set; } = ManagedConfiguration.Register(configSelection, n => n.PreselectedAgentProvider, string.Empty); + + /// + /// The minimum confidence level of the provider which selects the data sources. + /// + /// + /// It applies only while PreselectAgentOptions is on, and then to every provider which selects them, the fallbacks included. + /// + public ConfidenceLevel MinimumProviderConfidence { get; set; } = ManagedConfiguration.Register(configSelection, n => n.MinimumProviderConfidence, ConfidenceLevel.NONE); } \ No newline at end of file diff --git a/app/MindWork AI Studio/Settings/DataModel/DataAgentRetrievalContextValidation.cs b/app/MindWork AI Studio/Settings/DataModel/DataAgentRetrievalContextValidation.cs index 93ae50dd9..9d592baf8 100644 --- a/app/MindWork AI Studio/Settings/DataModel/DataAgentRetrievalContextValidation.cs +++ b/app/MindWork AI Studio/Settings/DataModel/DataAgentRetrievalContextValidation.cs @@ -1,5 +1,7 @@ using System.Linq.Expressions; +using AIStudio.Provider; + namespace AIStudio.Settings.DataModel; public sealed class DataAgentRetrievalContextValidation(Expression>? configSelection = null) @@ -12,7 +14,7 @@ public sealed class DataAgentRetrievalContextValidation(Expression - /// Enable the retrieval context validation agent? + /// Enable the retrieval context validation? /// public bool EnableRetrievalContextValidation { get; set; } = ManagedConfiguration.Register(configSelection, n => n.EnableRetrievalContextValidation, false); @@ -26,6 +28,14 @@ public sealed class DataAgentRetrievalContextValidation(Expression public string PreselectedAgentProvider { get; set; } = ManagedConfiguration.Register(configSelection, n => n.PreselectedAgentProvider, string.Empty); + /// + /// The minimum confidence level of the provider which validates the retrieval contexts. + /// + /// + /// It applies only while PreselectAgentOptions is on, and then to every provider which validates them, the fallbacks included. + /// + public ConfidenceLevel MinimumProviderConfidence { get; set; } = ManagedConfiguration.Register(configSelection, n => n.MinimumProviderConfidence, ConfidenceLevel.NONE); + /// /// Configure how many parallel validations to run. /// diff --git a/app/MindWork AI Studio/Settings/DataModel/DataAssistantPluginAudit.cs b/app/MindWork AI Studio/Settings/DataModel/DataAssistantPluginAudit.cs index 599e87a6d..e48d8982e 100644 --- a/app/MindWork AI Studio/Settings/DataModel/DataAssistantPluginAudit.cs +++ b/app/MindWork AI Studio/Settings/DataModel/DataAssistantPluginAudit.cs @@ -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 public string PreselectedAgentProvider { get; set; } = ManagedConfiguration.Register(configSelection, n => n.PreselectedAgentProvider, string.Empty); + /// + /// The minimum confidence level of the provider which audits the plugins. + /// + /// + /// It applies to every provider which audits a plugin, the fallbacks included. + /// + public ConfidenceLevel MinimumProviderConfidence { get; set; } = ManagedConfiguration.Register(configSelection, n => n.MinimumProviderConfidence, ConfidenceLevel.NONE); + /// /// The minimum audit level assistant plugins should meet. /// - 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); /// /// Should activation be blocked when the audit result is below the minimum level? diff --git a/app/MindWork AI Studio/Settings/DataModel/DataLegalCheck.cs b/app/MindWork AI Studio/Settings/DataModel/DataLegalCheck.cs index 5ead9bfc0..fccd28420 100644 --- a/app/MindWork AI Studio/Settings/DataModel/DataLegalCheck.cs +++ b/app/MindWork AI Studio/Settings/DataModel/DataLegalCheck.cs @@ -20,7 +20,7 @@ public class DataLegalCheck public bool PreselectWebContentReader { get; set; } /// - /// Preselect the content cleaner agent? + /// Preselect the text content cleaner? /// public bool PreselectContentCleanerAgent { get; set; } diff --git a/app/MindWork AI Studio/Settings/DataModel/DataSWOTAnalysis.cs b/app/MindWork AI Studio/Settings/DataModel/DataSWOTAnalysis.cs index e6e722f65..75cf8c08e 100644 --- a/app/MindWork AI Studio/Settings/DataModel/DataSWOTAnalysis.cs +++ b/app/MindWork AI Studio/Settings/DataModel/DataSWOTAnalysis.cs @@ -20,7 +20,7 @@ public sealed class DataSWOTAnalysis public bool PreselectWebContentReader { get; set; } /// - /// Preselect the content cleaner agent? + /// Preselect the text content cleaner? /// public bool PreselectContentCleanerAgent { get; set; } diff --git a/app/MindWork AI Studio/Settings/DataModel/DataSourceMailbox.cs b/app/MindWork AI Studio/Settings/DataModel/DataSourceMailbox.cs index 9e14338ba..48827a8ba 100644 --- a/app/MindWork AI Studio/Settings/DataModel/DataSourceMailbox.cs +++ b/app/MindWork AI Studio/Settings/DataModel/DataSourceMailbox.cs @@ -10,7 +10,7 @@ namespace AIStudio.Settings.DataModel; /// /// /// 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. /// public record struct DataSourceMailbox: IIndexedDataSource, ISecretId diff --git a/app/MindWork AI Studio/Settings/DataModel/DataSourceRetrievalMode.cs b/app/MindWork AI Studio/Settings/DataModel/DataSourceRetrievalMode.cs index 8377aed41..6e57445ac 100644 --- a/app/MindWork AI Studio/Settings/DataModel/DataSourceRetrievalMode.cs +++ b/app/MindWork AI Studio/Settings/DataModel/DataSourceRetrievalMode.cs @@ -7,14 +7,14 @@ public enum DataSourceRetrievalMode { /// /// 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. /// SEMANTIC_SEARCH, /// /// 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. /// EVERY_MESSAGE, diff --git a/app/MindWork AI Studio/Settings/DataModel/DataTextContentCleaner.cs b/app/MindWork AI Studio/Settings/DataModel/DataTextContentCleaner.cs index c1e7137e3..3854bd0bb 100644 --- a/app/MindWork AI Studio/Settings/DataModel/DataTextContentCleaner.cs +++ b/app/MindWork AI Studio/Settings/DataModel/DataTextContentCleaner.cs @@ -1,14 +1,33 @@ +using System.Linq.Expressions; + +using AIStudio.Provider; + namespace AIStudio.Settings.DataModel; -public sealed class DataTextContentCleaner +public sealed class DataTextContentCleaner(Expression>? configSelection = null) { + /// + /// The default constructor for the JSON deserializer. + /// + public DataTextContentCleaner() : this(null) + { + } + /// /// Preselect any text content cleaner options? /// - public bool PreselectAgentOptions { get; set; } + public bool PreselectAgentOptions { get; set; } = ManagedConfiguration.Register(configSelection, n => n.PreselectAgentOptions, false); /// /// Preselect a text content cleaner provider? /// - public string PreselectedAgentProvider { get; set; } = string.Empty; + public string PreselectedAgentProvider { get; set; } = ManagedConfiguration.Register(configSelection, n => n.PreselectedAgentProvider, string.Empty); + + /// + /// The minimum confidence level of the provider which cleans the text content. + /// + /// + /// It applies only while PreselectAgentOptions is on, and then to every provider which cleans it, the fallbacks included. + /// + public ConfidenceLevel MinimumProviderConfidence { get; set; } = ManagedConfiguration.Register(configSelection, n => n.MinimumProviderConfidence, ConfidenceLevel.NONE); } \ No newline at end of file diff --git a/app/MindWork AI Studio/Settings/DataModel/DataTextSummarizer.cs b/app/MindWork AI Studio/Settings/DataModel/DataTextSummarizer.cs index b47a5800d..295b4db0a 100644 --- a/app/MindWork AI Studio/Settings/DataModel/DataTextSummarizer.cs +++ b/app/MindWork AI Studio/Settings/DataModel/DataTextSummarizer.cs @@ -22,7 +22,7 @@ public sealed class DataTextSummarizer public bool PreselectWebContentReader { get; set; } /// - /// Preselect the content cleaner agent? + /// Preselect the text content cleaner? /// public bool PreselectContentCleanerAgent { get; set; } diff --git a/app/MindWork AI Studio/Settings/DataModel/DataTranslation.cs b/app/MindWork AI Studio/Settings/DataModel/DataTranslation.cs index 1af8abff7..44789f03c 100644 --- a/app/MindWork AI Studio/Settings/DataModel/DataTranslation.cs +++ b/app/MindWork AI Studio/Settings/DataModel/DataTranslation.cs @@ -30,7 +30,7 @@ public sealed class DataTranslation public bool PreselectWebContentReader { get; set; } /// - /// Preselect the content cleaner agent? + /// Preselect the text content cleaner? /// public bool PreselectContentCleanerAgent { get; set; } diff --git a/app/MindWork AI Studio/Settings/DataSourceOrderExtensions.cs b/app/MindWork AI Studio/Settings/DataSourceOrderExtensions.cs index cde0a33ba..84dda3b9c 100644 --- a/app/MindWork AI Studio/Settings/DataSourceOrderExtensions.cs +++ b/app/MindWork AI Studio/Settings/DataSourceOrderExtensions.cs @@ -10,7 +10,7 @@ public static class DataSourceOrderExtensions /// /// /// The same data sources always come in the same order, however the settings list them, the - /// checks return them, or an agent selects them. Semantic Search offers them this way, because + /// checks return them, or an AI operation selects them. Semantic Search offers them this way, because /// the providers cache a request from its beginning, and the tools are part of that beginning, /// see IToolImplementation.ResolveFunctionAsync. DataSourceRequirements names the first of /// several equally strict data sources this way, so that both ways of searching name the same. diff --git a/app/MindWork AI Studio/Settings/IDataSource.cs b/app/MindWork AI Studio/Settings/IDataSource.cs index 9772fcbfb..bf5a3ef9e 100644 --- a/app/MindWork AI Studio/Settings/IDataSource.cs +++ b/app/MindWork AI Studio/Settings/IDataSource.cs @@ -7,7 +7,7 @@ using AIStudio.Tools.RAG; namespace AIStudio.Settings; /// -/// The common interface for the data sources in DataSources, which classic RAG, Semantic Search and the agents read. +/// The common interface for the data sources in DataSources, which classic RAG, Semantic Search and the AI operations read. /// [JsonPolymorphic(TypeDiscriminatorPropertyName = "$type_discriminator")] [JsonDerivedType(typeof(DataSourceLocalDirectory), nameof(DataSourceType.LOCAL_DIRECTORY))] diff --git a/app/MindWork AI Studio/Settings/IDataSourceBase.cs b/app/MindWork AI Studio/Settings/IDataSourceBase.cs index 12fd42f4f..5b991fe3a 100644 --- a/app/MindWork AI Studio/Settings/IDataSourceBase.cs +++ b/app/MindWork AI Studio/Settings/IDataSourceBase.cs @@ -8,7 +8,7 @@ namespace AIStudio.Settings; /// /// /// Not every data source is an IDataSource. Those are the ones in DataSources, which classic RAG, -/// Semantic Search and the agents read. A data source kept in a list of its own is never handed to +/// Semantic Search and the AI operations read. A data source kept in a list of its own is never handed to /// them, and the compiler sees to that, because it implements only this interface or /// IIndexedDataSource. /// diff --git a/app/MindWork AI Studio/Settings/SettingsManager.cs b/app/MindWork AI Studio/Settings/SettingsManager.cs index 2424728ff..9206cbff7 100644 --- a/app/MindWork AI Studio/Settings/SettingsManager.cs +++ b/app/MindWork AI Studio/Settings/SettingsManager.cs @@ -464,13 +464,16 @@ public sealed class SettingsManager public void InjectSpellchecking(Dictionary attributes) => attributes["spellcheck"] = this.ConfigurationData.App.EnableSpellchecking ? "true" : "false"; + /// + /// The global minimum confidence level; NONE when neither the user nor the organization enforces one. + /// + public ConfidenceLevel GlobalMinimumConfidenceLevel => this.ConfigurationData.Confidence is { EnforceGlobalMinimumConfidence: true, GlobalMinimumConfidence: not ConfidenceLevel.NONE and not ConfidenceLevel.UNKNOWN } + ? this.ConfigurationData.Confidence.GlobalMinimumConfidence + : ConfidenceLevel.NONE; + public ConfidenceLevel GetMinimumConfidenceLevel(Tools.Components component) { - var minimumLevel = ConfidenceLevel.NONE; - var enforceGlobalMinimumConfidence = this.ConfigurationData.Confidence is { EnforceGlobalMinimumConfidence: true, GlobalMinimumConfidence: not ConfidenceLevel.NONE and not ConfidenceLevel.UNKNOWN }; - if (enforceGlobalMinimumConfidence) - minimumLevel = this.ConfigurationData.Confidence.GlobalMinimumConfidence; - + var minimumLevel = this.GlobalMinimumConfidenceLevel; var componentMinimumLevel = component.MinimumConfidence(this); if (componentMinimumLevel > minimumLevel) minimumLevel = componentMinimumLevel; @@ -612,6 +615,18 @@ public sealed class SettingsManager return this.ConfigurationData.Providers.FirstOrDefault(x => x.Id == this.ConfigurationData.App.PreselectedProvider && this.IsProviderUsable(x.UsedLLMProvider, minimumLevel)) ?? Provider.NONE; } + /// + /// The ID of the provider which serves as the app-wide default. + /// + /// + /// With exactly one configured provider, that one is the default, whatever the settings name, as in + /// GetPreselectedProvider. Neither a prohibition nor the confidence level is checked here: whoever uses + /// the provider checks them, e.g., AIOperationProviderChoice. The ID is empty when no default is set. + /// + public string AppDefaultProviderId => this.ConfigurationData.Providers.Count == 1 + ? this.ConfigurationData.Providers[0].Id + : this.ConfigurationData.App.PreselectedProvider; + public Provider GetChatProviderForLoadedChat(string? chatProviderId = null) { var minimumLevel = this.GetMinimumConfidenceLevel(Tools.Components.CHAT); diff --git a/app/MindWork AI Studio/Tools/AllowedSelectedDataSources.cs b/app/MindWork AI Studio/Tools/AllowedSelectedDataSources.cs index c7a525832..95d164914 100644 --- a/app/MindWork AI Studio/Tools/AllowedSelectedDataSources.cs +++ b/app/MindWork AI Studio/Tools/AllowedSelectedDataSources.cs @@ -10,7 +10,7 @@ namespace AIStudio.Tools; /// The selected data sources are a subset of the allowed data sources. /// /// The data sources waiting for a re-index are deliberately kept apart from the allowed ones rather -/// than mixed in. Everything reading the allowed list -- the data source selection agent above all +/// than mixed in. Everything reading the allowed list -- the data source selection above all /// -- takes it to mean "may be used to answer with", and a source whose index is being rebuilt /// cannot answer anything. It is listed separately so the user interface can still show it and say /// why it is greyed out, instead of letting it vanish without a word. diff --git a/app/MindWork AI Studio/Tools/AppIcons.cs b/app/MindWork AI Studio/Tools/AppIcons.cs index 9a5c76862..2f1cbef59 100644 --- a/app/MindWork AI Studio/Tools/AppIcons.cs +++ b/app/MindWork AI Studio/Tools/AppIcons.cs @@ -26,21 +26,12 @@ public static class AppIcons /// Shows or hides advanced or expert settings. public const string ADVANCED_SETTINGS = LucideIcons.SLIDERS_HORIZONTAL; - /// Marks an AI agent that works in the background, such as the security audit agent or the content cleaner when it has no usable provider. - public const string AGENT = LucideIcons.BOT; - - /// Marks the agent that cleans text content, such as removing navigation and ads from a loaded web page. - public const string AGENT_CONTENT_CLEANER = LucideIcons.BRUSH_CLEANING; - - /// Marks the agent that selects the data sources for a request. - public const string AGENT_DATA_SOURCE_SELECTION = LucideIcons.LIST_CHECKS; - - /// Marks the agent that validates retrieval contexts. - public const string AGENT_RETRIEVAL_CONTEXT_VALIDATION = LucideIcons.LIST_CHECKS; - /// Marks the AI, such as its role in a chat. public const string AI = LucideIcons.SPARKLES; + /// Marks a task which AI Studio hands to a model on its own, such as the security audit or the text content cleaner, e.g., when it has no usable provider. + public const string AI_OPERATION = LucideIcons.BOT; + /// Marks the data sources that the AI selected for a question. public const string AI_SELECTED_DATA_SOURCES = LucideIcons.LIST_FILTER; @@ -347,6 +338,9 @@ public static class AppIcons /// Shows that the data sources need no attention, because nothing is indexing and nothing failed. public const string DATA_SOURCES_UP_TO_DATE = LucideIcons.DATABASE_CHECK; + /// Marks the task in which a model selects the data sources for a request. + public const string DATA_SOURCE_SELECTION = LucideIcons.LIST_CHECKS; + /// Marks a single value in a data tree, such as a JSON value or another value of a plugin. public const string DATA_VALUE = LucideIcons.VARIABLE; @@ -983,6 +977,9 @@ public static class AppIcons /// Transcribes an audio or video source again. public const string RETRANSCRIBE = LucideIcons.AUDIO_LINES; + /// Marks the task in which a model validates the retrieval contexts for a request. + public const string RETRIEVAL_CONTEXT_VALIDATION = LucideIcons.LIST_CHECKS; + /// Reports that a data source could not be searched, so the search results are incomplete. public const string RETRIEVAL_GAP = LucideIcons.SEARCH_EXCLAMATION_POINT; @@ -1157,6 +1154,9 @@ public static class AppIcons /// Marks the choice of how complex a text should be. public const string TEXT_COMPLEXITY = LucideIcons.LAYERS; + /// Marks the task which cleans text content, such as removing navigation and ads from a loaded web page. + public const string TEXT_CONTENT_CLEANER = LucideIcons.BRUSH_CLEANING; + /// Marks a single-line text input, such as the text component of an assistant plugin. public const string TEXT_INPUT = LucideIcons.TEXT_CURSOR_INPUT; diff --git a/app/MindWork AI Studio/Tools/ComponentsExtensions.cs b/app/MindWork AI Studio/Tools/ComponentsExtensions.cs index 61e99e585..3cab80380 100644 --- a/app/MindWork AI Studio/Tools/ComponentsExtensions.cs +++ b/app/MindWork AI Studio/Tools/ComponentsExtensions.cs @@ -33,7 +33,7 @@ public static class ComponentsExtensions /// /// This is the single place that maps a built-in assistant to its category. The assistants page /// shows the assistant in the section of this category, and whatever offers assistants elsewhere - /// asks it, too. Components which are no assistant of their own, such as the chat or the agents, + /// asks it, too. Components which are no assistant of their own, such as the chat or the AI operations, /// return PluginCategory.NONE. /// /// The category of the assistant. @@ -223,6 +223,11 @@ public static class ComponentsExtensions Components.BATCH_PROCESSING_ASSISTANT => settingsManager.ConfigurationData.BatchProcessing.PreselectOptions ? settingsManager.ConfigurationData.BatchProcessing.MinimumProviderConfidence : default, Components.MODEL_COMPARISON_ASSISTANT => settingsManager.ConfigurationData.ModelComparison.PreselectOptions ? settingsManager.ConfigurationData.ModelComparison.MinimumProviderConfidence : default, + Components.AGENT_TEXT_CONTENT_CLEANER => settingsManager.ConfigurationData.TextContentCleaner.PreselectAgentOptions ? settingsManager.ConfigurationData.TextContentCleaner.MinimumProviderConfidence : default, + Components.AGENT_DATA_SOURCE_SELECTION => settingsManager.ConfigurationData.AgentDataSourceSelection.PreselectAgentOptions ? settingsManager.ConfigurationData.AgentDataSourceSelection.MinimumProviderConfidence : default, + Components.AGENT_RETRIEVAL_CONTEXT_VALIDATION => settingsManager.ConfigurationData.AgentRetrievalContextValidation.PreselectAgentOptions ? settingsManager.ConfigurationData.AgentRetrievalContextValidation.MinimumProviderConfidence : default, + Components.AGENT_ASSISTANT_PLUGIN_AUDIT => settingsManager.ConfigurationData.AssistantPluginAudit.MinimumProviderConfidence, + _ => default, }; @@ -263,11 +268,7 @@ public static class ComponentsExtensions // Dynamic assistants have no dedicated settings yet, so they derive their defaults from the chat: Components.DYNAMIC_ASSISTANT or Components.CHAT => settingsManager.ConfigurationData.Chat.PreselectOptions ? settingsManager.GetProviderById(settingsManager.ConfigurationData.Chat.PreselectedProvider) : Settings.Provider.NONE, - Components.AGENT_TEXT_CONTENT_CLEANER => settingsManager.ConfigurationData.TextContentCleaner.PreselectAgentOptions ? settingsManager.GetProviderById(settingsManager.ConfigurationData.TextContentCleaner.PreselectedAgentProvider) : Settings.Provider.NONE, - Components.AGENT_DATA_SOURCE_SELECTION => settingsManager.ConfigurationData.AgentDataSourceSelection.PreselectAgentOptions ? settingsManager.GetProviderById(settingsManager.ConfigurationData.AgentDataSourceSelection.PreselectedAgentProvider) : Settings.Provider.NONE, - Components.AGENT_RETRIEVAL_CONTEXT_VALIDATION => settingsManager.ConfigurationData.AgentRetrievalContextValidation.PreselectAgentOptions ? settingsManager.GetProviderById(settingsManager.ConfigurationData.AgentRetrievalContextValidation.PreselectedAgentProvider) : Settings.Provider.NONE, - Components.AGENT_ASSISTANT_PLUGIN_AUDIT => settingsManager.GetProviderById(settingsManager.ConfigurationData.AssistantPluginAudit.PreselectedAgentProvider), - + // The AI operations choose their provider through AIOperationProviderResolver, see AIOperations/AGENTS.md. _ => Settings.Provider.NONE, }; diff --git a/app/MindWork AI Studio/Tools/PluginSystem/AGENTS.md b/app/MindWork AI Studio/Tools/PluginSystem/AGENTS.md index e1c091218..9e5bbe2d4 100644 --- a/app/MindWork AI Studio/Tools/PluginSystem/AGENTS.md +++ b/app/MindWork AI Studio/Tools/PluginSystem/AGENTS.md @@ -24,7 +24,7 @@ and whoever runs it: loading, starting, checking an import, and the assistant bu ## Assistant plugins Every prompt text an assistant plugin brings, its `SystemPrompt` as well as its `CustomChatSystemPrompt`, goes -through `PluginAssistants.BuildSecureSystemPrompt` and into the security audit of `AssistantAuditAgent`. A new +through `PluginAssistants.BuildSecureSystemPrompt` and into the security audit of `PluginAuditOperation`. A new field which reaches a model as a prompt needs both, and its documentation in `Plugins/assistants/README.md` and in the template `Plugins/assistants/plugin.lua`: the Assistant Builder reads both files as its source of truth. diff --git a/app/MindWork AI Studio/Tools/PluginSystem/Assistants/AssistantPluginAuditService.cs b/app/MindWork AI Studio/Tools/PluginSystem/Assistants/AssistantPluginAuditService.cs index 9a82b1814..fb69d55f6 100644 --- a/app/MindWork AI Studio/Tools/PluginSystem/Assistants/AssistantPluginAuditService.cs +++ b/app/MindWork AI Studio/Tools/PluginSystem/Assistants/AssistantPluginAuditService.cs @@ -1,21 +1,47 @@ -using AIStudio.Agents.AssistantAudit; +using AIStudio.AIOperations; +using AIStudio.AIOperations.PluginAudit; +using AIStudio.Provider; +using AIStudio.Settings; namespace AIStudio.Tools.PluginSystem.Assistants; /// -/// Runs an assistant security audit and maps the agent result to the persisted audit model. +/// Runs the security audit of an assistant plugin and maps its result to the persisted audit model. /// -public sealed class AssistantPluginAuditService(AssistantAuditAgent auditAgent) +public sealed class AssistantPluginAuditService(PluginAuditOperation auditOperation, AIOperationProviderResolver providerResolver, SettingsManager settingsManager) { + private static string TB(string fallbackEN) => I18N.I.T(fallbackEN, typeof(AssistantPluginAuditService).Namespace, nameof(AssistantPluginAuditService)); + + private static string TA(string fallbackEN) => I18N.I.TA(fallbackEN, typeof(AssistantPluginAuditService).Namespace, nameof(AssistantPluginAuditService)); + /// /// Runs an assistant plugin audit, optionally falling back to the supplied provider when no audit provider is configured. /// - public async Task RunAuditAsync(PluginAssistants plugin, Settings.Provider? fallbackProvider = null, CancellationToken token = default) + /// The plugin to audit. + /// A provider somebody picked for something else, e.g., the assistant they are building; the audit falls back on it last. + /// The cancellation token. + /// The audit, which names the provider it ran with. + public async Task RunAuditAsync(PluginAssistants plugin, Settings.Provider? providerAtHand = null, CancellationToken token = default) { - var result = await auditAgent.AuditAsync(plugin, fallbackProvider, token); - var provider = auditAgent.ProviderSettings; - var promptPreview = await plugin.BuildAuditPromptPreviewAsync(token); + var request = new PluginAuditRequest(plugin); + var choice = providerResolver.Resolve(auditOperation, request, PluginAuditOperation.GetProviderSettings(settingsManager), GetProviderOptions(settingsManager, providerAtHand)); + PluginAuditResult result; + if (choice.HasProvider) + result = await auditOperation.RunAsync(request, new(choice.Provider), token); + else + { + var issue = GetRelevantIssue(choice); + await MessageBus.INSTANCE.SendError(new (AppIcons.AI_OPERATION, GetMissingProviderMessage(issue))); + result = new PluginAuditResult + { + Level = nameof(PluginAuditLevel.UNKNOWN), + Summary = GetMissingProviderSummary(issue), + }; + } + + var provider = choice.Provider; + var promptPreview = await plugin.BuildAuditPromptPreviewAsync(token); return new PluginAssistantAudit { PluginId = plugin.Id, @@ -25,11 +51,123 @@ public sealed class AssistantPluginAuditService(AssistantAuditAgent auditAgent) AuditProviderName = provider == Settings.Provider.NONE ? string.Empty : provider.InstanceName, - Level = AssistantAuditLevel.ParseOrUnknown(result.Level), + Level = PluginAuditLevel.ParseOrUnknown(result.Level), Summary = result.Summary, Confidence = result.Confidence, PromptPreview = promptPreview, Findings = result.Findings, }; } + + /// + /// Audits every running assistant plugin which needs an audit, as long as automatic audits are switched on. + /// + /// + /// In the background, there is no provider at hand. Should no provider be left for a plugin, its audit would + /// fail without a request, and the user would get two messages for each plugin, again with every visit of the + /// assistants or plugins page. Such a plugin is therefore skipped, and a single message says why. + /// + /// The cancellation token. + /// The audits which succeeded, for the caller to store. + public async Task> RunAutomaticAuditsAsync(CancellationToken token = default) + { + if (!settingsManager.ConfigurationData.AssistantPluginAudit.AutomaticallyAuditAssistants) + return []; + + var audits = new List(); + AIOperationProviderIssue? issueOfSkippedPlugins = null; + foreach (var plugin in PluginFactory.RunningPlugins.OfType().ToList()) + { + if (!PluginAssistantSecurityResolver.Resolve(settingsManager, plugin).RequiresAudit) + continue; + + var choice = this.PreviewProvider(new PluginAuditRequest(plugin)); + if (!choice.HasProvider) + { + issueOfSkippedPlugins ??= GetRelevantIssue(choice); + continue; + } + + var audit = await this.RunAuditAsync(plugin, token: token); + if (audit.Level is PluginAuditLevel.UNKNOWN) + { + await MessageBus.INSTANCE.SendError(new (AppIcons.AI_OPERATION, string.Format(TA("The automatic security audit for the assistant plugin '{0}' failed. Please run it manually on the plugins page."), plugin.Name))); + continue; + } + + audits.Add(audit); + } + + if (issueOfSkippedPlugins is { } issue) + await MessageBus.INSTANCE.SendError(new (AppIcons.AI_OPERATION, GetAutomaticAuditMessage(issue))); + + return audits; + } + + /// + /// Which provider an audit would run with when nobody has a provider at hand, as in the background. + /// + /// The audit, for the confidence its content requires; null for the least any audit requires. + /// The choice, which logs nothing. + public AIOperationProviderChoice PreviewProvider(PluginAuditRequest? request = null) + { + var requiredConfidence = request is null + ? ConfidenceLevel.NONE + : auditOperation.GetRequiredConfidence(request); + + return providerResolver.Preview(PluginAuditOperation.GetProviderSettings(settingsManager), requiredConfidence, GetProviderOptions(settingsManager, null)); + } + + /// + /// What an audit adds to the choice of its provider. + /// + /// + /// Without a provider of its own, an audit falls back on the app-wide default, and then on the provider at + /// hand. A provider somebody picked for something else -- the assistant they were building, the revision + /// they asked for, the check they are standing in front of -- may read the source of a plugin only when it + /// clears the bar of the audit. Otherwise a provider an organization ruled out for audits would see the very + /// thing it was ruled out for. + /// + /// The settings, for the app-wide default. + /// The provider at hand, or null. + /// The options for the provider resolver. + internal static AIOperationProviderOptions GetProviderOptions(SettingsManager settingsManager, Settings.Provider? providerAtHand) => new() + { + FallbackProviderIds = [settingsManager.AppDefaultProviderId, providerAtHand?.Id], + OwnMinimumConfidenceAppliesToFallbacks = true, + }; + + /// + /// The issue which explains best why no provider can audit: the one of the provider somebody named. + /// + /// + /// The first named fallback is the app-wide default, or the provider at hand when there is no default. + /// When no fallback was named at all, the preferred provider of the audit is what failed. + /// + /// The choice without a provider. + /// The issue to explain; NOT_SET when nobody named any provider. + internal static AIOperationProviderIssue GetRelevantIssue(AIOperationProviderChoice choice) => choice.FallbackIssue is AIOperationProviderIssue.NOT_SET + ? choice.PreferredIssue + : choice.FallbackIssue; + + private static string GetMissingProviderMessage(AIOperationProviderIssue issue) => issue switch + { + AIOperationProviderIssue.NOT_SET or AIOperationProviderIssue.MISSING => TB("No provider is configured for security checks."), + AIOperationProviderIssue.PROHIBITED => TA("Your organization does not allow the provider for security checks. Pick another one, or choose a dedicated provider for security checks in the app settings."), + _ => TA("The selected provider is not trusted enough for security checks. Pick one which meets the confidence required here, or choose a dedicated provider for security checks in the app settings."), + }; + + private static string GetAutomaticAuditMessage(AIOperationProviderIssue issue) => issue switch + { + AIOperationProviderIssue.NOT_SET or AIOperationProviderIssue.MISSING => TA("AI Studio did not audit new or updated assistant plugins automatically, because no model is set for security checks, and there is no app-wide default either. Choose a model for security checks in the settings."), + AIOperationProviderIssue.PROHIBITED => TA("AI Studio did not audit new or updated assistant plugins automatically, because your organization does not allow the model for security checks. Choose another one in the settings."), + _ => TA("AI Studio did not audit new or updated assistant plugins automatically, because the model for security checks is not trusted enough. Choose another one in the settings."), + }; + + private static string GetMissingProviderSummary(AIOperationProviderIssue issue) => issue switch + { + AIOperationProviderIssue.NOT_SET or AIOperationProviderIssue.MISSING => TB("No audit provider is configured."), + AIOperationProviderIssue.PROHIBITED => TB("The organization does not allow the provider for security checks."), + _ => TB("The provider is not trusted enough for security checks."), + }; } diff --git a/app/MindWork AI Studio/Tools/PluginSystem/Assistants/PluginAssistantAudit.cs b/app/MindWork AI Studio/Tools/PluginSystem/Assistants/PluginAssistantAudit.cs index 6048b2cd3..24302283d 100644 --- a/app/MindWork AI Studio/Tools/PluginSystem/Assistants/PluginAssistantAudit.cs +++ b/app/MindWork AI Studio/Tools/PluginSystem/Assistants/PluginAssistantAudit.cs @@ -1,4 +1,4 @@ -using AIStudio.Agents.AssistantAudit; +using AIStudio.AIOperations.PluginAudit; namespace AIStudio.Tools.PluginSystem.Assistants; @@ -9,9 +9,9 @@ public sealed class PluginAssistantAudit public DateTimeOffset AuditedAtUtc { get; set; } public string AuditProviderId { get; set; } = string.Empty; public string AuditProviderName { get; set; } = string.Empty; - public AssistantAuditLevel Level { get; set; } = AssistantAuditLevel.UNKNOWN; + public PluginAuditLevel Level { get; set; } = PluginAuditLevel.UNKNOWN; public string Summary { get; set; } = string.Empty; public float Confidence { get; set; } public string PromptPreview { get; set; } = string.Empty; - public List Findings { get; set; } = []; + public List Findings { get; set; } = []; } diff --git a/app/MindWork AI Studio/Tools/PluginSystem/Assistants/PluginAssistantSecurityResolver.cs b/app/MindWork AI Studio/Tools/PluginSystem/Assistants/PluginAssistantSecurityResolver.cs index 719821335..185885418 100644 --- a/app/MindWork AI Studio/Tools/PluginSystem/Assistants/PluginAssistantSecurityResolver.cs +++ b/app/MindWork AI Studio/Tools/PluginSystem/Assistants/PluginAssistantSecurityResolver.cs @@ -1,4 +1,4 @@ -using AIStudio.Agents.AssistantAudit; +using AIStudio.AIOperations.PluginAudit; using AIStudio.Settings; namespace AIStudio.Tools.PluginSystem.Assistants; @@ -111,8 +111,8 @@ public static class PluginAssistantSecurityResolver CanActivatePlugin = true, CanStartAssistant = true, AuditLabel = TB("Safe"), - AuditColor = AssistantAuditLevel.SAFE.Color, - AuditIcon = AssistantAuditLevel.SAFE.Icon, + AuditColor = PluginAuditLevel.SAFE.Color, + AuditIcon = PluginAuditLevel.SAFE.Icon, AvailabilityLabel = GetAvailabilityLabel(requiresAudit: false, hasAudit: true, hasHashMismatch: false, isBlocked: false, canOverride: false), AvailabilityColor = GetAvailabilityColor(requiresAudit: false, hasAudit: true, hasHashMismatch: false, isBlocked: false, canOverride: false), AvailabilityIcon = GetAvailabilityIcon(requiresAudit: false, hasAudit: true, hasHashMismatch: false, isBlocked: false, canOverride: false), @@ -130,7 +130,7 @@ public static class PluginAssistantSecurityResolver } var audit = settingsManager.ConfigurationData.AssistantPluginAudits.FirstOrDefault(x => x.PluginId == plugin.Id); - var hasAudit = audit is not null && audit.Level is not AssistantAuditLevel.UNKNOWN; + var hasAudit = audit is not null && audit.Level is not PluginAuditLevel.UNKNOWN; var hashMatches = hasAudit && string.Equals(NormalizeHash(audit!.PluginHash), currentHash, StringComparison.Ordinal); var hasHashMismatch = hasAudit && !hashMatches; var isBelowMinimum = hashMatches && audit is not null && audit.Level < auditSettings.MinimumLevel; @@ -159,8 +159,8 @@ public static class PluginAssistantSecurityResolver CanActivatePlugin = !isBlocked, CanStartAssistant = !isBlocked, AuditLabel = TB("Unknown"), - AuditColor = AssistantAuditLevel.UNKNOWN.Color, - AuditIcon = AssistantAuditLevel.UNKNOWN.Icon, + AuditColor = PluginAuditLevel.UNKNOWN.Color, + AuditIcon = PluginAuditLevel.UNKNOWN.Icon, AvailabilityLabel = GetAvailabilityLabel(requiresAudit, hasAudit, hasHashMismatch, isBlocked, canOverride: false), AvailabilityColor = GetAvailabilityColor(requiresAudit, hasAudit, hasHashMismatch, isBlocked, canOverride: false), AvailabilityIcon = GetAvailabilityIcon(requiresAudit, hasAudit, hasHashMismatch, isBlocked, canOverride: false), @@ -198,8 +198,8 @@ public static class PluginAssistantSecurityResolver CanActivatePlugin = !isBlocked, CanStartAssistant = !isBlocked, AuditLabel = TB("Unknown"), - AuditColor = AssistantAuditLevel.UNKNOWN.Color, - AuditIcon = AssistantAuditLevel.UNKNOWN.Icon, + AuditColor = PluginAuditLevel.UNKNOWN.Color, + AuditIcon = PluginAuditLevel.UNKNOWN.Icon, AvailabilityLabel = GetAvailabilityLabel(requiresAudit, hasAudit, hasHashMismatch, isBlocked, canOverride: false), AvailabilityColor = GetAvailabilityColor(requiresAudit, hasAudit, hasHashMismatch, isBlocked, canOverride: false), AvailabilityIcon = GetAvailabilityIcon(requiresAudit, hasAudit, hasHashMismatch, isBlocked, canOverride: false), diff --git a/app/MindWork AI Studio/Tools/PluginSystem/PluginConfiguration.cs b/app/MindWork AI Studio/Tools/PluginSystem/PluginConfiguration.cs index 96d23fbe4..a20e12956 100644 --- a/app/MindWork AI Studio/Tools/PluginSystem/PluginConfiguration.cs +++ b/app/MindWork AI Studio/Tools/PluginSystem/PluginConfiguration.cs @@ -408,19 +408,27 @@ public sealed class PluginConfiguration(bool isInternal, LuaState state, PluginT && maximumPauseSeconds < minimumPauseSeconds) LOG.LogWarning("The upper bound of the pause between indexing steps configured by plugin {ConfigPluginId} is below its lower bound. The lower bound of {MinimumPauseSeconds} seconds wins.", this.Id, minimumPauseSeconds); - // Config: data source selection agent settings + // Config: text content cleaner settings + ManagedConfiguration.TryProcessConfiguration(x => x.TextContentCleaner, x => x.PreselectAgentOptions, this.Id, settingsTable, dryRun); + ManagedConfiguration.TryProcessConfiguration(x => x.TextContentCleaner, x => x.PreselectedAgentProvider, Guid.Empty, this.Id, settingsTable, dryRun); + ManagedConfiguration.TryProcessConfiguration(x => x.TextContentCleaner, x => x.MinimumProviderConfidence, this.Id, settingsTable, dryRun); + + // Config: data source selection settings ManagedConfiguration.TryProcessConfiguration(x => x.AgentDataSourceSelection, x => x.PreselectAgentOptions, this.Id, settingsTable, dryRun); ManagedConfiguration.TryProcessConfiguration(x => x.AgentDataSourceSelection, x => x.PreselectedAgentProvider, Guid.Empty, this.Id, settingsTable, dryRun); + ManagedConfiguration.TryProcessConfiguration(x => x.AgentDataSourceSelection, x => x.MinimumProviderConfidence, this.Id, settingsTable, dryRun); - // Config: retrieval context validation agent settings + // Config: retrieval context validation settings ManagedConfiguration.TryProcessConfiguration(x => x.AgentRetrievalContextValidation, x => x.EnableRetrievalContextValidation, this.Id, settingsTable, dryRun); ManagedConfiguration.TryProcessConfiguration(x => x.AgentRetrievalContextValidation, x => x.PreselectAgentOptions, this.Id, settingsTable, dryRun); ManagedConfiguration.TryProcessConfiguration(x => x.AgentRetrievalContextValidation, x => x.PreselectedAgentProvider, Guid.Empty, this.Id, settingsTable, dryRun); + ManagedConfiguration.TryProcessConfiguration(x => x.AgentRetrievalContextValidation, x => x.MinimumProviderConfidence, this.Id, settingsTable, dryRun); ManagedConfiguration.TryProcessConfiguration(x => x.AgentRetrievalContextValidation, x => x.NumParallelValidations, this.Id, settingsTable, dryRun); // Config: assistant plugin audit settings ManagedConfiguration.TryProcessConfiguration(x => x.AssistantPluginAudit, x => x.RequireAuditBeforeActivation, this.Id, settingsTable, dryRun); ManagedConfiguration.TryProcessConfiguration(x => x.AssistantPluginAudit, x => x.PreselectedAgentProvider, Guid.Empty, this.Id, settingsTable, dryRun); + ManagedConfiguration.TryProcessConfiguration(x => x.AssistantPluginAudit, x => x.MinimumProviderConfidence, this.Id, settingsTable, dryRun); ManagedConfiguration.TryProcessConfiguration(x => x.AssistantPluginAudit, x => x.MinimumLevel, this.Id, settingsTable, dryRun); ManagedConfiguration.TryProcessConfiguration(x => x.AssistantPluginAudit, x => x.BlockActivationBelowMinimum, this.Id, settingsTable, dryRun); ManagedConfiguration.TryProcessConfiguration(x => x.AssistantPluginAudit, x => x.AutomaticallyAuditAssistants, this.Id, settingsTable, dryRun); diff --git a/app/MindWork AI Studio/Tools/RAG/AugmentationProcesses/AugmentationOne.cs b/app/MindWork AI Studio/Tools/RAG/AugmentationProcesses/AugmentationOne.cs index 2102fcc0d..3d6b3f9ee 100644 --- a/app/MindWork AI Studio/Tools/RAG/AugmentationProcesses/AugmentationOne.cs +++ b/app/MindWork AI Studio/Tools/RAG/AugmentationProcesses/AugmentationOne.cs @@ -1,6 +1,7 @@ using System.Text; -using AIStudio.Agents; +using AIStudio.AIOperations; +using AIStudio.AIOperations.RetrievalContextValidation; using AIStudio.Chat; using AIStudio.Provider; using AIStudio.Settings; @@ -54,14 +55,21 @@ public sealed class AugmentationOne : IAugmentationProcess // Want the user to validate all retrieval contexts? if (settings.ConfigurationData.AgentRetrievalContextValidation.EnableRetrievalContextValidation && chatThread.DataSourceOptions.AutomaticValidation) { - // Let's get the validation agent & set up its provider: - var validationAgent = Program.SERVICE_PROVIDER.GetService()!; - if (validationAgent.SetLLMProvider(provider, chatThread.DataSecurity, chatThread.RequiredProviderConfidence)) + // + // Which provider validates? Only one which may see what the chat may see: the model reads + // the passages. One choice serves all passages of this answer. + // + var validation = Program.SERVICE_PROVIDER.GetRequiredService(); + var providerResolver = Program.SERVICE_PROVIDER.GetRequiredService(); + var validationRequest = new RetrievalContextValidationRequest(chatThread.SystemPrompt, lastUserPrompt, preparedContexts, chatThread.RequiredProviderConfidence); + var validationProviderOptions = ClassicRagProviderOptions.ForDataAccess(settings, provider.ConfiguredProviderId, chatThread.DataSecurity, chatThread.RequiredProviderConfidence); + var validationChoice = providerResolver.Resolve(validation, validationRequest, RetrievalContextValidationOperation.GetProviderSettings(settings), validationProviderOptions); + if (validationChoice.HasProvider) { try { // Let's validate all retrieval contexts: - var validationResults = await validationAgent.ValidateRetrievalContextsAsync(lastUserPrompt, chatThread, preparedContexts, token); + var validationResults = await validation.RunAsync(validationRequest, new(validationChoice.Provider), token); if (validationResults.Count == 0) LOGGER.LogWarning("Retrieval context validation returned no results. Continuing augmentation with all retrieved contexts."); else @@ -98,7 +106,7 @@ public sealed class AugmentationOne : IAugmentationProcess // an event. It does not change between two answers, so a message would repeat itself // with every single one until the setting changes. // - LOGGER.LogWarning("Skipping retrieval context validation because no sufficiently trusted validation agent provider is available. Continuing augmentation with all retrieved contexts."); + LOGGER.LogWarning("Skipping retrieval context validation because no provider which is trusted enough is available for it. Continuing augmentation with all retrieved contexts."); } } diff --git a/app/MindWork AI Studio/Tools/RAG/ClassicRagProviderOptions.cs b/app/MindWork AI Studio/Tools/RAG/ClassicRagProviderOptions.cs new file mode 100644 index 000000000..ad70a199f --- /dev/null +++ b/app/MindWork AI Studio/Tools/RAG/ClassicRagProviderOptions.cs @@ -0,0 +1,51 @@ +using AIStudio.AIOperations; +using AIStudio.Provider; +using AIStudio.Settings; +using AIStudio.Settings.DataModel; + +namespace AIStudio.Tools.RAG; + +/// +/// What the classic RAG process adds to the choice of a provider for its AI operations. +/// +/// +/// The data source selection and the validation of retrieval contexts run with the same fallbacks, and +/// DataSourceService asks with them in advance which providers would see the data. All three build their +/// options here, so that the providers a check counts are the ones which run. +/// +public static class ClassicRagProviderOptions +{ + /// + /// Builds the options for an AI operation of the classic RAG process. + /// + /// + /// Without a provider of its own, an operation falls back on the provider of the chat, and then on the + /// app-wide default. Its minimum confidence applies to both of them. + /// + /// The settings, for the app-wide default. + /// The ID of the provider of the chat. + /// An optional check of the caller, e.g., whether a provider may see the data sources. + /// The options for the provider resolver. + public static AIOperationProviderOptions For(SettingsManager settingsManager, string chatProviderId, Func? checkProvider = null) => new() + { + FallbackProviderIds = [chatProviderId, settingsManager.AppDefaultProviderId], + OwnMinimumConfidenceAppliesToFallbacks = true, + CheckProvider = checkProvider, + }; + + /// + /// Builds the options for an AI operation of the classic RAG process which reads the data of data sources. + /// + /// + /// Besides the fallbacks, every candidate has to be allowed to see the data, by the security and the + /// confidence it requires. A candidate which is not reports NOT_ALLOWED_FOR_CONTENT. + /// + /// The settings, for the app-wide default. + /// The ID of the provider of the chat. + /// The data security the data requires. + /// The provider confidence the data requires. + /// The options for the provider resolver. + public static AIOperationProviderOptions ForDataAccess(SettingsManager settingsManager, string chatProviderId, DataSourceSecurity requiredDataSecurity, ConfidenceLevel requiredConfidenceLevel) => For(settingsManager, chatProviderId, candidate => candidate.AllowsDataSourceAccess(settingsManager, requiredDataSecurity, requiredConfidenceLevel) + ? AIOperationProviderIssue.NONE + : AIOperationProviderIssue.NOT_ALLOWED_FOR_CONTENT); +} \ No newline at end of file diff --git a/app/MindWork AI Studio/Tools/RAG/DataSourceSelectionProcesses/AgenticSrcSelWithDynHeur.cs b/app/MindWork AI Studio/Tools/RAG/DataSourceSelectionProcesses/AgenticSrcSelWithDynHeur.cs index 5a9cc5d2b..7983bcd89 100644 --- a/app/MindWork AI Studio/Tools/RAG/DataSourceSelectionProcesses/AgenticSrcSelWithDynHeur.cs +++ b/app/MindWork AI Studio/Tools/RAG/DataSourceSelectionProcesses/AgenticSrcSelWithDynHeur.cs @@ -1,4 +1,5 @@ -using AIStudio.Agents; +using AIStudio.AIOperations; +using AIStudio.AIOperations.DataSourceChoice; using AIStudio.Chat; using AIStudio.Components; using AIStudio.Provider; @@ -31,14 +32,38 @@ public class AgenticSrcSelWithDynHeur : IDataSourceSelectionProcess IReadOnlyList selectedDataSources = []; IReadOnlyList finalAISelection = []; - // Get the agent for the data source selection: - var selectionAgent = Program.SERVICE_PROVIDER.GetService()!; + var choiceOperation = Program.SERVICE_PROVIDER.GetRequiredService(); + var providerResolver = Program.SERVICE_PROVIDER.GetRequiredService(); + var settingsManager = Program.SERVICE_PROVIDER.GetRequiredService(); var allowedDataSources = dataSources.AllowedDataSources.ToDictionary(ds => ds.Id, StringComparer.Ordinal); try { - // Let the AI agent do its work: - var aiSelectedDataSources = await selectionAgent.PerformSelectionAsync(provider, lastUserPrompt, chatThread, dataSources, token); + // + // Which provider chooses? Only one which may see the data sources: the model reads their + // descriptions, and what it chooses decides what is searched. + // + var request = new DataSourceChoiceRequest(chatThread.SystemPrompt, lastUserPrompt, dataSources.AllowedDataSources); + var choice = providerResolver.Resolve(choiceOperation, request, DataSourceChoiceOperation.GetProviderSettings(settingsManager), GetChoiceProviderOptions(settingsManager, provider.ConfiguredProviderId, dataSources.AllowedDataSources)); + if (!choice.HasProvider) + { + LOGGER.LogWarning($"No provider may select the data sources, which require data security '{dataSources.AllowedDataSources.GetRequiredSecurityPolicy()}' and provider confidence '{dataSources.AllowedDataSources.GetRequiredConfidenceLevel().Name}'. The RAG process is skipped."); + proceedWithRAG = false; + + return new(proceedWithRAG, selectedDataSources); + } + + // Let the AI do its work: + var choiceResult = await choiceOperation.RunAsync(request, new(choice.Provider), token); + if (!choiceResult.IsAnswered) + { + LOGGER.LogWarning("The AI gave no usable answer to the selection of data sources. The RAG process is skipped."); + proceedWithRAG = false; + + return new(proceedWithRAG, selectedDataSources); + } + + var aiSelectedDataSources = choiceResult.SelectedDataSources.ToList(); // Check if the AI selected any data sources: if (aiSelectedDataSources.Count is 0) @@ -112,4 +137,17 @@ public class AgenticSrcSelWithDynHeur : IDataSourceSelectionProcess } #endregion + + /// + /// What the process adds to the choice of the provider which selects the data sources. + /// + /// + /// Besides the fallbacks of the classic RAG process, the provider has to be allowed to see the data + /// sources, by their security and by the confidence they require. + /// + /// The settings. + /// The ID of the provider of the chat. + /// The data sources to choose from. + /// The options for the provider resolver. + internal static AIOperationProviderOptions GetChoiceProviderOptions(SettingsManager settingsManager, string chatProviderId, IReadOnlyList dataSources) => ClassicRagProviderOptions.ForDataAccess(settingsManager, chatProviderId, dataSources.GetRequiredSecurityPolicy(), dataSources.GetRequiredConfidenceLevel()); } \ No newline at end of file diff --git a/app/MindWork AI Studio/Tools/RAG/IDataSourceSelectionProcess.cs b/app/MindWork AI Studio/Tools/RAG/IDataSourceSelectionProcess.cs index f81ffe3ee..ea2028572 100644 --- a/app/MindWork AI Studio/Tools/RAG/IDataSourceSelectionProcess.cs +++ b/app/MindWork AI Studio/Tools/RAG/IDataSourceSelectionProcess.cs @@ -23,7 +23,7 @@ public interface IDataSourceSelectionProcess /// /// Starts the data source selection process. /// - /// The LLM provider. Used as default for data selection agents. + /// The LLM provider. Used as the fallback of the AI operation which selects data sources. /// The last prompt that was issued by the user. /// The chat thread. /// The allowed data sources yielded by the data source service. diff --git a/app/MindWork AI Studio/Tools/RAG/RAGProcesses/AISrcSelWithRetCtxVal.cs b/app/MindWork AI Studio/Tools/RAG/RAGProcesses/AISrcSelWithRetCtxVal.cs index 82503db9b..92ac5ec90 100644 --- a/app/MindWork AI Studio/Tools/RAG/RAGProcesses/AISrcSelWithRetCtxVal.cs +++ b/app/MindWork AI Studio/Tools/RAG/RAGProcesses/AISrcSelWithRetCtxVal.cs @@ -293,12 +293,12 @@ public sealed class AISrcSelWithRetCtxVal : IRagProcess /// Semantic Search asks the same place, DataSourceRequirements, so that both ways of searching /// demand the same of the same data sources. Only the data sources whose passages reached the /// AI count: one which found nothing leaves the chat as it was, and so does one whose passages - /// the validation agent dropped, or which did not fit into what the model can read, see + /// the validation dropped, or which did not fit into what the model can read, see /// PassageBudget. Neither the model nor any of its tools ever saw those passages; the - /// validation agent did, but it has no tools. Otherwise, a data source of public papers could + /// validation did, but it has no tools. Otherwise, a data source of public papers could /// fill the budget while the passages of a confidential one stayed out, and the chat would /// still lose the web search for good. The data security and the provider confidence were - /// raised before the retrieval already, for every selected data source, because the agents see + /// raised before the retrieval already, for every selected data source, because the AI operations see /// the passages as well; the data sources with passages are among them, so asking again would /// change nothing.

/// The answer which follows does not offer the web search any more: the request reads the diff --git a/app/MindWork AI Studio/Tools/Services/DataSourceDescriptionService.cs b/app/MindWork AI Studio/Tools/Services/DataSourceDescriptionService.cs index 4d7857aee..49e2779db 100644 --- a/app/MindWork AI Studio/Tools/Services/DataSourceDescriptionService.cs +++ b/app/MindWork AI Studio/Tools/Services/DataSourceDescriptionService.cs @@ -11,7 +11,7 @@ namespace AIStudio.Tools.Services; /// Tells a model what a data source holds, so that it can decide where to search. /// /// -/// Both the agent which selects data sources and Semantic Search describe the data sources to a +/// Both the AI operation which selects data sources and Semantic Search describe the data sources to a /// model. The user describes a local data source. An ERI data source is described by its server, /// which costs two requests and is written by somebody else: that description is filtered for /// prompt injections like any other external content before it is kept. It is kept for a few diff --git a/app/MindWork AI Studio/Tools/Services/DataSourceEmbeddingService.cs b/app/MindWork AI Studio/Tools/Services/DataSourceEmbeddingService.cs index dfd7b2c83..b3fe7296a 100644 --- a/app/MindWork AI Studio/Tools/Services/DataSourceEmbeddingService.cs +++ b/app/MindWork AI Studio/Tools/Services/DataSourceEmbeddingService.cs @@ -1201,7 +1201,7 @@ public sealed partial class DataSourceEmbeddingService(SettingsManager settingsM /// /// /// The one place which knows where data sources are kept: in DataSources those which classic - /// RAG and the agents see as well, in Mailboxes those which only the mail tools read. Whatever + /// RAG and its AI operations see as well, in Mailboxes those which only the mail tools read. Whatever /// works through all of them, or looks one up by its id, goes through here. /// /// The data sources, those from DataSources first. diff --git a/app/MindWork AI Studio/Tools/Services/DataSourceService.cs b/app/MindWork AI Studio/Tools/Services/DataSourceService.cs index 821ee77cc..4c323f0d7 100644 --- a/app/MindWork AI Studio/Tools/Services/DataSourceService.cs +++ b/app/MindWork AI Studio/Tools/Services/DataSourceService.cs @@ -1,9 +1,13 @@ +using AIStudio.AIOperations; +using AIStudio.AIOperations.DataSourceChoice; +using AIStudio.AIOperations.RetrievalContextValidation; using AIStudio.Assistants.ERI; using AIStudio.Provider; using AIStudio.Settings; using AIStudio.Settings.DataModel; using AIStudio.Tools.ERIClient; using AIStudio.Tools.ERIClient.DataModel; +using AIStudio.Tools.RAG; namespace AIStudio.Tools.Services; @@ -11,7 +15,7 @@ public sealed class DataSourceService { // // Trust is recorded for every participating provider, while only the chat provider's trust - // decides about external data sources below. The agent which validates retrieval contexts + // decides about external data sources below. The AI operation which validates retrieval contexts // checks its own provider before it runs, so nothing slips through today. Keeping the value // named here is what makes that asymmetry visible. // @@ -22,11 +26,13 @@ public sealed class DataSourceService private readonly DataSourceEmbeddingService embeddingService; private readonly RustService rustService; private readonly SettingsManager settingsManager; + private readonly AIOperationProviderResolver providerResolver; private readonly ILogger logger; - public DataSourceService(SettingsManager settingsManager, ILogger logger, RustService rustService, DataSourceEmbeddingService embeddingService) + public DataSourceService(SettingsManager settingsManager, AIOperationProviderResolver providerResolver, ILogger logger, RustService rustService, DataSourceEmbeddingService embeddingService) { this.logger = logger; + this.providerResolver = providerResolver; this.rustService = rustService; this.settingsManager = settingsManager; this.embeddingService = embeddingService; @@ -40,8 +46,8 @@ public sealed class DataSourceService /// It also returns the data sources selected before when they are still allowed. /// /// The selected LLM provider. - /// The active data source options, which determine which agent providers participate. - /// How the data sources are searched in effect, which decides whether any agent participates at all. + /// The active data source options, which determine which AI operations participate. + /// How the data sources are searched in effect, which decides whether any AI operation participates at all. /// The data sources selected before. /// The allowed data sources and the data sources selected before -- when they are still allowed. public async Task GetDataSources(AIStudio.Settings.Provider selectedLLMProvider, DataSourceOptions dataSourceOptions, DataSourceRetrievalMode retrievalMode, IReadOnlyCollection? previousSelectedDataSources = null) @@ -69,8 +75,8 @@ public sealed class DataSourceService /// this method checks only the supplied data sources. /// /// The selected LLM provider. - /// The active data source options, which determine which agent providers participate. - /// How the data sources are searched in effect, which decides whether any agent participates at all. + /// The active data source options, which determine which AI operations participate. + /// How the data sources are searched in effect, which decides whether any AI operation participates at all. /// The data sources to check. /// The requested data sources that are allowed for the provider. public async Task> GetAllowedDataSources(AIStudio.Settings.Provider selectedLLMProvider, DataSourceOptions dataSourceOptions, DataSourceRetrievalMode retrievalMode, IReadOnlyCollection requestedDataSources) @@ -101,8 +107,8 @@ public sealed class DataSourceService /// It also returns the data sources selected before when they are still allowed. /// /// The selected LLM provider. - /// The active data source options, which determine which agent providers participate. - /// How the data sources are searched in effect, which decides whether any agent participates at all. + /// The active data source options, which determine which AI operations participate. + /// How the data sources are searched in effect, which decides whether any AI operation participates at all. /// The data sources selected before. /// The allowed data sources and the data sources selected before -- when they are still allowed. public async Task GetDataSources(IProvider selectedLLMProvider, DataSourceOptions dataSourceOptions, DataSourceRetrievalMode retrievalMode, IReadOnlyCollection? previousSelectedDataSources = null) @@ -128,46 +134,62 @@ public sealed class DataSourceService { var providers = new List { currentProvider }; var retrievalContextValidationEnabled = this.settingsManager.ConfigurationData.AgentRetrievalContextValidation.EnableRetrievalContextValidation; - foreach (var (component, role) in GetParticipatingAgents(dataSourceOptions, retrievalMode, retrievalContextValidationEnabled)) - this.AddAgentProvider(providers, component, currentProviderId, role); + foreach (var (component, role) in GetParticipatingOperations(dataSourceOptions, retrievalMode, retrievalContextValidationEnabled)) + this.AddOperationProvider(providers, component, currentProviderId, role); return providers; } /// - /// Which agents get to see the data of the data sources, besides the chat provider. + /// Which AI operations get to see the data of the data sources, besides the chat provider. /// /// - /// Only the classic RAG process runs agents. With Semantic Search, the chat model picks the + /// Only the classic RAG process runs AI operations. With Semantic Search, the chat model picks the /// data sources and judges what it found itself, so the data reaches no other provider. - /// Counting the providers of the agents there would hold back data sources which the chat + /// Counting the providers of the AI operations there would hold back data sources which the chat /// provider alone may use. /// /// The active data source options. /// How the data sources are searched in effect. /// Whether the validation of retrieval contexts is enabled in the settings. - /// The component of each participating agent, together with its role for the log. - internal static IReadOnlyList<(Components Component, string Role)> GetParticipatingAgents(DataSourceOptions dataSourceOptions, DataSourceRetrievalMode retrievalMode, bool retrievalContextValidationEnabled) + /// The component of each participating AI operation, together with its role for the log. + internal static IReadOnlyList<(Components Component, string Role)> GetParticipatingOperations(DataSourceOptions dataSourceOptions, DataSourceRetrievalMode retrievalMode, bool retrievalContextValidationEnabled) { if (retrievalMode is DataSourceRetrievalMode.SEMANTIC_SEARCH) return []; - var agents = new List<(Components Component, string Role)>(2); + var operations = new List<(Components Component, string Role)>(2); if (dataSourceOptions.AutomaticDataSourceSelection) - agents.Add((Components.AGENT_DATA_SOURCE_SELECTION, "data source selection agent")); + operations.Add((Components.AGENT_DATA_SOURCE_SELECTION, "data source selection")); if (dataSourceOptions.AutomaticValidation && retrievalContextValidationEnabled) - agents.Add((Components.AGENT_RETRIEVAL_CONTEXT_VALIDATION, "retrieval context validation agent")); + operations.Add((Components.AGENT_RETRIEVAL_CONTEXT_VALIDATION, "retrieval context validation")); - return agents; + return operations; } - private void AddAgentProvider(List providers, Components component, string currentProviderId, string role) + /// + /// Adds the provider which an AI operation would run with, chosen as the operation chooses it when it runs. + /// + /// + /// The data sources are what this check decides, so the choice leaves out the check of the data + /// sources, which the operation adds when it runs. Should that check refuse the provider counted here, + /// the operation falls back on the provider of the chat, which this check counts as well. + /// + private void AddOperationProvider(List providers, Components component, string currentProviderId, string role) { - var provider = this.settingsManager.GetPreselectedProvider(component, currentProviderId, true); + var operationSettings = component switch + { + Components.AGENT_DATA_SOURCE_SELECTION => DataSourceChoiceOperation.GetProviderSettings(this.settingsManager), + Components.AGENT_RETRIEVAL_CONTEXT_VALIDATION => RetrievalContextValidationOperation.GetProviderSettings(this.settingsManager), + _ => AIOperationProviderSettings.NONE, + }; + + var provider = this.providerResolver.Preview(operationSettings, ConfidenceLevel.NONE, ClassicRagProviderOptions.For(this.settingsManager, currentProviderId)).Provider; + if (provider == Settings.Provider.NONE) { - this.logger.LogWarning($"No provider is available for the {role}. Data sources cannot be made available while this agent is enabled."); + this.logger.LogWarning($"No provider is available for the {role}. Data sources cannot be made available while this AI operation is enabled."); providers.Add(new(role, false, ConfidenceLevel.NONE)); return; } diff --git a/app/MindWork AI Studio/Tools/Services/DirectChatService.cs b/app/MindWork AI Studio/Tools/Services/DirectChatService.cs index 0163b1950..197498ead 100644 --- a/app/MindWork AI Studio/Tools/Services/DirectChatService.cs +++ b/app/MindWork AI Studio/Tools/Services/DirectChatService.cs @@ -308,7 +308,7 @@ public sealed class DirectChatService(SettingsManager settingsManager, DataSourc // // There is nothing to check when data sources are switched off, and nothing to check either - // when an agent picks them: that choice is made per message in the chat, exactly as it is + // when an AI operation picks them: that choice is made per message in the chat, exactly as it is // for a chat template the user picks by hand. // if (chosenOptions.DisableDataSources || chosenOptions.AutomaticDataSourceSelection || chosenOptions.PreselectedDataSourceIds.Count == 0) @@ -351,8 +351,8 @@ public sealed class DirectChatService(SettingsManager settingsManager, DataSourc { // // The options the launched chat will run under are what this check runs against: they - // decide which agent providers take part, and an agent with too little confidence makes - // a data source unavailable. Agents take part only when the chat searches with every + // decide which providers of AI operations take part, and an AI operation with too little confidence makes + // a data source unavailable. AI operations take part only when the chat searches with every // message, which the chat decides the same way: // var retrievalMode = await toolRegistry.GetEffectiveRetrievalModeAsync(chosenOptions, provider, Components.CHAT); diff --git a/app/MindWork AI Studio/Tools/ToolCallingSystem/ToolCallingImplementations/SemanticSearch/SemanticSearchTool.cs b/app/MindWork AI Studio/Tools/ToolCallingSystem/ToolCallingImplementations/SemanticSearch/SemanticSearchTool.cs index 745aa9223..35221b3b0 100644 --- a/app/MindWork AI Studio/Tools/ToolCallingSystem/ToolCallingImplementations/SemanticSearch/SemanticSearchTool.cs +++ b/app/MindWork AI Studio/Tools/ToolCallingSystem/ToolCallingImplementations/SemanticSearch/SemanticSearchTool.cs @@ -207,9 +207,9 @@ public sealed class SemanticSearchTool(SettingsManager settingsManager, DataSour /// /// /// When the AI selects the data sources, it may search every data source the provider may use: - /// the AI which selects is the chat model itself, no agent. Otherwise, it may search those the + /// the AI which selects is the chat model itself, no AI operation. Otherwise, it may search those the /// user selected, as far as the provider may use them. Only the chat provider counts, since no - /// agent takes part, see DataSourceService.GetParticipatingAgents.

+ /// AI operation takes part, see DataSourceService.GetParticipatingOperations.

/// Preparing a request knows the provider by its settings, running a call by the provider /// itself. Both ask the same question, so both come here. The classic RAG process asks here as /// well while it steps back for this tool, so that it names the unreachable data sources in the diff --git a/app/MindWork AI Studio/Tools/ToolCallingSystem/ToolRegistry.cs b/app/MindWork AI Studio/Tools/ToolCallingSystem/ToolRegistry.cs index fc56fc60d..a74f48c78 100644 --- a/app/MindWork AI Studio/Tools/ToolCallingSystem/ToolRegistry.cs +++ b/app/MindWork AI Studio/Tools/ToolCallingSystem/ToolRegistry.cs @@ -864,7 +864,7 @@ public sealed class ToolRegistry /// /// The one place which decides between the two. The RAG process, the data source selection, /// and the check of what a launched chat may search all ask here, so that none of them counts - /// the agents of the RAG process in or out while another does the opposite. The chat searches + /// the AI operations of the RAG process in or out while another does the opposite. The chat searches /// itself when the user prefers it and GetOfferBlockReasonAsync has nothing against it. Its /// answer comes along whatever the user prefers, so that the user interface can leave out a /// choice which is none and say why the chat searches with every message.

diff --git a/app/MindWork AI Studio/wwwroot/changelog/v26.11.2.md b/app/MindWork AI Studio/wwwroot/changelog/v26.11.2.md index 71f3f88c4..b3a3ab368 100644 --- a/app/MindWork AI Studio/wwwroot/changelog/v26.11.2.md +++ b/app/MindWork AI Studio/wwwroot/changelog/v26.11.2.md @@ -7,6 +7,8 @@ - Added the option for organizations to disable categories of assistants, such as entertainment, through configuration plugins. Assistant plugins which an organization deployed itself stay available. - Added custom categories to assistant plugins: a plugin which fits none of the categories of AI Studio can name its own. AI Studio shows these names as the plugin writes them, in every language. - Added the Model Comparison assistant, which shows you which of two models helps you better. You compare them blindly, without knowing which model wrote which answer: with the same request sent to both, or while you work on your own tasks over days or weeks. Charts show you which model wins, and a judge model can give you a second opinion based on your own expectations. You find the assistant in the category "General". Thanks, Dominic Neuburg (`donework`), for this contribution. +- Added the minimum confidence of the provider for each AI task, such as the data source selection or the security audit of assistant plugins, to configuration plugins, so that organizations can preset or lock it. +- Added the settings of the text content cleaner to configuration plugins, so that organizations can preset or lock which model cleans web content. - Improved how well the AI remembers what it looked up in a chat: for its earlier answers, it now knows which web pages it read, which searches it ran, and which sources it used. When you ask a follow-up question, it can read the page again instead of claiming that it never read it. - Improved follow-up questions about web pages which a tool found, such as the results of a web search: the Read Web Page tool may read these pages again later in the same chat, also after you restart AI Studio and also when it may otherwise read only addresses which stand in the chat. - Improved the texts of AI Studio: we corrected grammar mistakes, missing words, and punctuation in many English texts and improved the wording of some German ones. A few texts which every language showed in English are now translated as well. @@ -19,6 +21,8 @@ - Improved the chat while you wait for an answer: AI Studio now tells you when it is processing your prompt and when the model is thinking, instead of showing an animation alone. - Improved the chat when it nearly fills the context window of the selected model: before sending your message, AI Studio tells you and offers to compress the chat or to send your message anyway. When compressing would not help, for example, because your message alone is too long, AI Studio tells you why. For a self-hosted model, enter its context window under "Override Model Limits" in the settings of the provider. - Improved the assistants when a request nearly fills the context window of the selected model: before sending it, AI Studio tells you, so that you can attach fewer or smaller files, or send the request anyway. +- Improved the settings of the AI tasks, which AI Studio hands to a model on its own, such as the data source selection or the text content cleaner, formerly called agents: for each of them, you can now set the minimum confidence its provider needs, and the provider selection tells you which model AI Studio uses when you choose none. +- Improved classic RAG: when the model you chose for selecting data sources or validating retrieval contexts may not see the data sources of your chat, AI Studio now uses the model of the chat for this step instead of skipping it. - Changed the icons of AI Studio to Lucide, an open-source icon set. All icons now share one style, and each feature shows the same icon wherever you meet it. - Fixed assistant plugins, which all appeared under "Installed Assistants" on the assistants page. Each one now appears under its own category, such as "Business", next to the built-in assistants of that category. - Fixed the Assistant Builder, which ignored the category you chose for your assistant. You can now also name a category of your own. @@ -27,4 +31,6 @@ - Fixed the translation assistant complaining about a missing text before you had typed anything, e.g., right after you switched the live translation on or off. - Fixed text fields in assistants and dialogs which kept showing a missing or invalid input while you typed, until you left the field. They now check your input again half a second after you stop typing. - Fixed AI Studio claiming that the provider had returned an invalid tool calling response when you stopped an answer while the AI was still thinking and could use tools. The same false message no longer follows a timeout or a lost connection either, which AI Studio reports on its own. -- Fixed the fonts of AI Studio, which were missing from all released versions. Your computer used fonts of its own instead; now, texts and code appear in the fonts we chose for AI Studio. \ No newline at end of file +- Fixed the fonts of AI Studio, which were missing from all released versions. Your computer used fonts of its own instead; now, texts and code appear in the fonts we chose for AI Studio. +- Fixed the settings of the security audit for assistant plugins, which you could change even when your organization had locked them through a configuration plugin. They now show the lock, like all other settings your organization manages. +- Fixed the automatic security audit of assistant plugins when no model was set for it: you got two error messages for each plugin, again whenever you opened the assistants or plugins page. Now AI Studio tells you once, and the settings of the security audit show a warning. \ No newline at end of file diff --git a/app/Tests/AIOperations/AIOperationProviderChoiceTests.cs b/app/Tests/AIOperations/AIOperationProviderChoiceTests.cs new file mode 100644 index 000000000..991166e16 --- /dev/null +++ b/app/Tests/AIOperations/AIOperationProviderChoiceTests.cs @@ -0,0 +1,191 @@ +using AIStudio.AIOperations; +using AIStudio.Provider; + +namespace AIStudio.Tests.AIOperations; + +/// +/// Checks how the provider of an AI operation is chosen from the facts about its candidates. +/// +/// +/// Each row names the candidates, the rules, and what has to come out: the chosen provider, why the preferred +/// one was not chosen, and why the first named fallback failed. The rows cover every issue and their order, +/// the order of the fallbacks, the minimum of the operation for fallbacks switched on and off, and the rules +/// which apply to every candidate. Names are written out in full where a short one would find a namespace +/// of this assembly first, see AIOperationProviderResolverTests. +/// +[TestFixture] +public sealed class AIOperationProviderChoiceTests +{ + private const string PREFERRED = "preferred"; + private const string FIRST = "first"; + private const string SECOND = "second"; + + [TestCaseSource(nameof(Cases))] + public void ChoosesTheExpectedProvider(Func preferred, Func[] fallbacks, AIOperationProviderRules rules, string? expectedProviderId, AIOperationProviderIssue expectedPreferredIssue, AIOperationProviderIssue expectedFallbackIssue) + { + var choice = AIOperationProviderChoice.Choose(preferred(), fallbacks.Select(fallback => fallback()).ToList(), rules); + + Assert.Multiple(() => + { + if (expectedProviderId is null) + Assert.That(choice.HasProvider, Is.False, "No candidate passes, so no provider may be chosen."); + else + Assert.That(choice.Provider.Id, Is.EqualTo(expectedProviderId)); + + Assert.That(choice.PreferredIssue, Is.EqualTo(expectedPreferredIssue)); + Assert.That(choice.FallbackIssue, Is.EqualTo(expectedFallbackIssue)); + }); + } + + [Test] + public void ReportsWhetherAFallbackWasChosen() + { + var rules = Rules(); + var preferredChoice = AIOperationProviderChoice.Choose(Candidate(PREFERRED)(), [Candidate(FIRST)()], rules); + var fallbackChoice = AIOperationProviderChoice.Choose(AIOperationProviderCandidate.NOT_NAMED, [Candidate(FIRST)()], rules); + var noChoice = AIOperationProviderChoice.Choose(AIOperationProviderCandidate.NOT_NAMED, [], rules); + + Assert.Multiple(() => + { + Assert.That(preferredChoice.UsesFallback, Is.False); + Assert.That(fallbackChoice.UsesFallback, Is.True); + Assert.That(noChoice.UsesFallback, Is.False, "Without a provider, nothing was chosen, not even a fallback."); + }); + } + + private static IEnumerable Cases() + { + // + // The preferred provider and each issue in turn: + // + yield return Row("PreferredWinsWhenItPasses", + Candidate(PREFERRED), [Candidate(FIRST)], Rules(), + PREFERRED, AIOperationProviderIssue.NONE, AIOperationProviderIssue.NONE); + + yield return Row("PreferredNotSetFallsBackWithoutAHint", + NotNamed, [Candidate(FIRST)], Rules(), + FIRST, AIOperationProviderIssue.NOT_SET, AIOperationProviderIssue.NONE); + + yield return Row("PreferredMissingFallsBack", + Missing, [Candidate(FIRST)], Rules(), + FIRST, AIOperationProviderIssue.MISSING, AIOperationProviderIssue.NONE); + + yield return Row("PreferredProhibitedFallsBack", + Candidate(PREFERRED, isProhibited: true), [Candidate(FIRST)], Rules(), + FIRST, AIOperationProviderIssue.PROHIBITED, AIOperationProviderIssue.NONE); + + yield return Row("PreferredBelowTheGlobalMinimumFallsBack", + Candidate(PREFERRED, ConfidenceLevel.LOW), [Candidate(FIRST)], Rules(global: ConfidenceLevel.MEDIUM), + FIRST, AIOperationProviderIssue.BELOW_MINIMUM_CONFIDENCE, AIOperationProviderIssue.NONE); + + yield return Row("PreferredBelowTheOwnMinimumFallsBack", + Candidate(PREFERRED, ConfidenceLevel.LOW), [Candidate(FIRST)], Rules(own: ConfidenceLevel.MEDIUM), + FIRST, AIOperationProviderIssue.BELOW_MINIMUM_CONFIDENCE, AIOperationProviderIssue.NONE); + + yield return Row("PreferredBelowWhatTheContentRequiresFallsBack", + Candidate(PREFERRED, ConfidenceLevel.LOW), [Candidate(FIRST)], Rules(required: ConfidenceLevel.MEDIUM), + FIRST, AIOperationProviderIssue.NOT_ALLOWED_FOR_CONTENT, AIOperationProviderIssue.NONE); + + yield return Row("PreferredRefusedForItsContentByTheCallerFallsBack", + Candidate(PREFERRED, callerIssue: AIOperationProviderIssue.NOT_ALLOWED_FOR_CONTENT), [Candidate(FIRST)], Rules(), + FIRST, AIOperationProviderIssue.NOT_ALLOWED_FOR_CONTENT, AIOperationProviderIssue.NONE); + + yield return Row("PreferredWithTooSmallAWindowFallsBack", + Candidate(PREFERRED, callerIssue: AIOperationProviderIssue.CONTEXT_WINDOW_TOO_SMALL), [Candidate(FIRST)], Rules(), + FIRST, AIOperationProviderIssue.CONTEXT_WINDOW_TOO_SMALL, AIOperationProviderIssue.NONE); + + yield return Row("ReachingTheMinimumExactlyIsEnough", + Candidate(PREFERRED, ConfidenceLevel.MEDIUM), [], Rules(ConfidenceLevel.MEDIUM, ConfidenceLevel.MEDIUM, ConfidenceLevel.MEDIUM), + PREFERRED, AIOperationProviderIssue.NONE, AIOperationProviderIssue.NONE); + + // + // The order of the issues: a candidate reports the first rule it breaks. + // + yield return Row("AProhibitionComesBeforeTheConfidence", + Candidate(PREFERRED, ConfidenceLevel.LOW, isProhibited: true), [], Rules(global: ConfidenceLevel.HIGH), + null, AIOperationProviderIssue.PROHIBITED, AIOperationProviderIssue.NOT_SET); + + yield return Row("TheMinimumComesBeforeWhatTheContentRequires", + Candidate(PREFERRED, ConfidenceLevel.LOW), [], Rules(own: ConfidenceLevel.MEDIUM, required: ConfidenceLevel.HIGH), + null, AIOperationProviderIssue.BELOW_MINIMUM_CONFIDENCE, AIOperationProviderIssue.NOT_SET); + + yield return Row("WhatTheContentRequiresComesBeforeTheCheckOfTheCaller", + Candidate(PREFERRED, ConfidenceLevel.LOW, callerIssue: AIOperationProviderIssue.CONTEXT_WINDOW_TOO_SMALL), [], Rules(required: ConfidenceLevel.MEDIUM), + null, AIOperationProviderIssue.NOT_ALLOWED_FOR_CONTENT, AIOperationProviderIssue.NOT_SET); + + // + // The order of the fallbacks: + // + yield return Row("TheFirstPassingFallbackWins", + NotNamed, [Candidate(FIRST, isProhibited: true), Candidate(SECOND), Candidate("third")], Rules(), + SECOND, AIOperationProviderIssue.NOT_SET, AIOperationProviderIssue.NONE); + + yield return Row("AFallbackNobodyNamedIsSkipped", + NotNamed, [NotNamed, Candidate(SECOND)], Rules(), + SECOND, AIOperationProviderIssue.NOT_SET, AIOperationProviderIssue.NONE); + + // + // The minimum of the operation for fallbacks: + // + yield return Row("TheOwnMinimumAppliesToFallbacksWhenSwitchedOn", + NotNamed, [Candidate(FIRST, ConfidenceLevel.LOW)], Rules(own: ConfidenceLevel.MEDIUM), + null, AIOperationProviderIssue.NOT_SET, AIOperationProviderIssue.BELOW_MINIMUM_CONFIDENCE); + + yield return Row("TheOwnMinimumSparesFallbacksWhenSwitchedOff", + NotNamed, [Candidate(FIRST, ConfidenceLevel.LOW)], Rules(own: ConfidenceLevel.MEDIUM, ownForFallbacks: false), + FIRST, AIOperationProviderIssue.NOT_SET, AIOperationProviderIssue.NONE); + + yield return Row("TheOwnMinimumStillAppliesToThePreferredWhenSwitchedOffForFallbacks", + Candidate(PREFERRED, ConfidenceLevel.LOW), [Candidate(FIRST, ConfidenceLevel.LOW)], Rules(own: ConfidenceLevel.MEDIUM, ownForFallbacks: false), + FIRST, AIOperationProviderIssue.BELOW_MINIMUM_CONFIDENCE, AIOperationProviderIssue.NONE); + + // + // What applies to every candidate, even with the minimum of the operation switched off for fallbacks: + // + yield return Row("TheGlobalMinimumAppliesToFallbacks", + NotNamed, [Candidate(FIRST, ConfidenceLevel.LOW)], Rules(global: ConfidenceLevel.MEDIUM, ownForFallbacks: false), + null, AIOperationProviderIssue.NOT_SET, AIOperationProviderIssue.BELOW_MINIMUM_CONFIDENCE); + + yield return Row("AProhibitionAppliesToFallbacks", + NotNamed, [Candidate(FIRST, isProhibited: true)], Rules(ownForFallbacks: false), + null, AIOperationProviderIssue.NOT_SET, AIOperationProviderIssue.PROHIBITED); + + yield return Row("WhatTheContentRequiresAppliesToFallbacks", + NotNamed, [Candidate(FIRST, ConfidenceLevel.LOW)], Rules(required: ConfidenceLevel.MEDIUM, ownForFallbacks: false), + null, AIOperationProviderIssue.NOT_SET, AIOperationProviderIssue.NOT_ALLOWED_FOR_CONTENT); + + yield return Row("TheCheckOfTheCallerAppliesToFallbacks", + NotNamed, [Candidate(FIRST, callerIssue: AIOperationProviderIssue.CONTEXT_WINDOW_TOO_SMALL)], Rules(ownForFallbacks: false), + null, AIOperationProviderIssue.NOT_SET, AIOperationProviderIssue.CONTEXT_WINDOW_TOO_SMALL); + + // + // What is reported when nothing passes: + // + yield return Row("NothingNamedNeedsNoHint", + NotNamed, [], Rules(), + null, AIOperationProviderIssue.NOT_SET, AIOperationProviderIssue.NOT_SET); + + yield return Row("TheFallbackIssueIsTheOneOfTheFirstNamedFallback", + Candidate(PREFERRED, isProhibited: true), [NotNamed, Missing, Candidate(SECOND, isProhibited: true)], Rules(), + null, AIOperationProviderIssue.PROHIBITED, AIOperationProviderIssue.MISSING); + + yield return Row("FallbacksNobodyNamedLeaveTheFallbackIssueNotSet", + Candidate(PREFERRED, isProhibited: true), [NotNamed, NotNamed], Rules(), + null, AIOperationProviderIssue.PROHIBITED, AIOperationProviderIssue.NOT_SET); + } + + private static TestCaseData Row(string name, Func preferred, Func[] fallbacks, AIOperationProviderRules rules, string? expectedProviderId, AIOperationProviderIssue expectedPreferredIssue, AIOperationProviderIssue expectedFallbackIssue) => new TestCaseData(preferred, fallbacks, rules, expectedProviderId, expectedPreferredIssue, expectedFallbackIssue).SetName(name); + + private static AIOperationProviderRules Rules(ConfidenceLevel global = ConfidenceLevel.NONE, ConfidenceLevel own = ConfidenceLevel.NONE, ConfidenceLevel required = ConfidenceLevel.NONE, bool ownForFallbacks = true) => new(global, own, required, ownForFallbacks); + + // + // The rows hand over factories instead of candidates: NUnit gathers the rows before TestHost sets up the + // logger factory, and a provider built that early breaks the type initializer of Settings.Provider for + // every test of the run. + // + private static Func NotNamed => () => AIOperationProviderCandidate.NOT_NAMED; + + private static Func Missing => () => AIOperationProviderCandidate.MISSING; + + private static Func Candidate(string id, ConfidenceLevel confidence = ConfidenceLevel.HIGH, bool isProhibited = false, AIOperationProviderIssue callerIssue = AIOperationProviderIssue.NONE) => () => new(new AIStudio.Settings.Provider(1, id, id, LLMProviders.SELF_HOSTED, new("test-model", null)), true, true, isProhibited, confidence, callerIssue); +} \ No newline at end of file diff --git a/app/Tests/AIOperations/AIOperationProviderResolverTests.cs b/app/Tests/AIOperations/AIOperationProviderResolverTests.cs new file mode 100644 index 000000000..f99d64013 --- /dev/null +++ b/app/Tests/AIOperations/AIOperationProviderResolverTests.cs @@ -0,0 +1,173 @@ +using AIStudio.AIOperations; +using AIStudio.Provider; +using AIStudio.Settings; + +using Microsoft.Extensions.Logging.Abstractions; + +namespace AIStudio.Tests.AIOperations; + +/// +/// Checks that the resolver gathers the facts about the candidates from the settings. +/// +/// +/// AIOperationProviderChoiceTests covers the decision itself. Here, it is about what the resolver reads: +/// a deleted provider, a prohibition of the organization, the global minimum, the check of the caller, and +/// the app-wide default with its shortcut for a single provider.

+/// Names are written out in full where a short one would find a namespace of this assembly first. This +/// assembly has an AIStudio.Tests.Tools and an AIStudio.Tests.Provider of its own, and the app has an +/// AIStudio.Components -- all three are what a short name finds from here, and a using alias does not help, +/// because names from the enclosing namespaces win over it. +///
+[TestFixture] +public sealed class AIOperationProviderResolverTests +{ + private const string OWN_PROVIDER_ID = "11111111-1111-1111-1111-111111111111"; + private const string FALLBACK_PROVIDER_ID = "22222222-2222-2222-2222-222222222222"; + private const string APP_DEFAULT_PROVIDER_ID = "33333333-3333-3333-3333-333333333333"; + private const string DELETED_PROVIDER_ID = "44444444-4444-4444-4444-444444444444"; + + [Test] + public void APickedProviderWhichWasDeletedIsMissing() + { + var settingsManager = CreateSettingsManager(); + AddProvider(settingsManager, FALLBACK_PROVIDER_ID, LLMProviders.SELF_HOSTED); + AddProvider(settingsManager, APP_DEFAULT_PROVIDER_ID, LLMProviders.SELF_HOSTED); + + var choice = CreateResolver(settingsManager).Preview(new(DELETED_PROVIDER_ID, ConfidenceLevel.NONE), ConfidenceLevel.NONE, new() { FallbackProviderIds = [FALLBACK_PROVIDER_ID] }); + + Assert.Multiple(() => + { + Assert.That(choice.Provider.Id, Is.EqualTo(FALLBACK_PROVIDER_ID)); + Assert.That(choice.PreferredIssue, Is.EqualTo(AIOperationProviderIssue.MISSING), "A provider which was picked and deleted since is worth a hint, unlike one nobody picked."); + }); + } + + [Test] + public void AProviderOfNoneCountsAsNotPicked() + { + var settingsManager = CreateSettingsManager(); + AddProvider(settingsManager, FALLBACK_PROVIDER_ID, LLMProviders.SELF_HOSTED); + AddProvider(settingsManager, APP_DEFAULT_PROVIDER_ID, LLMProviders.SELF_HOSTED); + + var choice = CreateResolver(settingsManager).Preview(new(AIStudio.Settings.Provider.NONE.Id, ConfidenceLevel.NONE), ConfidenceLevel.NONE, new() { FallbackProviderIds = [FALLBACK_PROVIDER_ID] }); + + Assert.That(choice.PreferredIssue, Is.EqualTo(AIOperationProviderIssue.NOT_SET), "Some settings store the ID of Provider.NONE for an empty choice."); + } + + [Test] + public void AProhibitionOfTheOrganizationIsRead() + { + var settingsManager = CreateSettingsManager(); + AddProvider(settingsManager, OWN_PROVIDER_ID, LLMProviders.OPEN_AI); + AddProvider(settingsManager, FALLBACK_PROVIDER_ID, LLMProviders.SELF_HOSTED); + settingsManager.ConfigurationData.App.ProhibitedProviders.Add(LLMProviders.OPEN_AI); + + var choice = CreateResolver(settingsManager).Preview(new(OWN_PROVIDER_ID, ConfidenceLevel.NONE), ConfidenceLevel.NONE, new() { FallbackProviderIds = [FALLBACK_PROVIDER_ID] }); + + Assert.Multiple(() => + { + Assert.That(choice.Provider.Id, Is.EqualTo(FALLBACK_PROVIDER_ID)); + Assert.That(choice.PreferredIssue, Is.EqualTo(AIOperationProviderIssue.PROHIBITED)); + }); + } + + [Test] + public void TheGlobalMinimumIsRead() + { + var settingsManager = CreateSettingsManager(); + AddProvider(settingsManager, OWN_PROVIDER_ID, LLMProviders.OPEN_AI); + AddProvider(settingsManager, FALLBACK_PROVIDER_ID, LLMProviders.OPEN_AI); + settingsManager.ConfigurationData.Confidence.EnforceGlobalMinimumConfidence = true; + settingsManager.ConfigurationData.Confidence.GlobalMinimumConfidence = ConfidenceLevel.HIGH; + + var choice = CreateResolver(settingsManager).Preview(new(OWN_PROVIDER_ID, ConfidenceLevel.NONE), ConfidenceLevel.NONE, new() { FallbackProviderIds = [FALLBACK_PROVIDER_ID], OwnMinimumConfidenceAppliesToFallbacks = false }); + + Assert.Multiple(() => + { + Assert.That(choice.HasProvider, Is.False, "What the organization enforces leaves no fallback out, even one exempt from the minimum of the operation."); + Assert.That(choice.PreferredIssue, Is.EqualTo(AIOperationProviderIssue.BELOW_MINIMUM_CONFIDENCE)); + Assert.That(choice.FallbackIssue, Is.EqualTo(AIOperationProviderIssue.BELOW_MINIMUM_CONFIDENCE)); + }); + } + + [Test] + public void TheCheckOfTheCallerSeesEveryConfiguredCandidate() + { + var settingsManager = CreateSettingsManager(); + AddProvider(settingsManager, OWN_PROVIDER_ID, LLMProviders.SELF_HOSTED); + AddProvider(settingsManager, FALLBACK_PROVIDER_ID, LLMProviders.SELF_HOSTED); + var checkedIds = new List(); + + var choice = CreateResolver(settingsManager).Preview(new(OWN_PROVIDER_ID, ConfidenceLevel.NONE), ConfidenceLevel.NONE, new() + { + FallbackProviderIds = [DELETED_PROVIDER_ID, FALLBACK_PROVIDER_ID], + CheckProvider = provider => + { + checkedIds.Add(provider.Id); + return provider.Id == OWN_PROVIDER_ID ? AIOperationProviderIssue.NOT_ALLOWED_FOR_CONTENT : AIOperationProviderIssue.NONE; + }, + }); + + Assert.Multiple(() => + { + Assert.That(choice.Provider.Id, Is.EqualTo(FALLBACK_PROVIDER_ID)); + Assert.That(choice.PreferredIssue, Is.EqualTo(AIOperationProviderIssue.NOT_ALLOWED_FOR_CONTENT)); + Assert.That(checkedIds, Is.EqualTo(new[] { OWN_PROVIDER_ID, FALLBACK_PROVIDER_ID }), "The check gets the configured providers only, never a missing one."); + }); + } + + [Test] + public void TheAppDefaultIsTheOneTheSettingsName() + { + var settingsManager = CreateSettingsManager(); + AddProvider(settingsManager, FALLBACK_PROVIDER_ID, LLMProviders.SELF_HOSTED); + AddProvider(settingsManager, APP_DEFAULT_PROVIDER_ID, LLMProviders.SELF_HOSTED); + settingsManager.ConfigurationData.App.PreselectedProvider = APP_DEFAULT_PROVIDER_ID; + + var choice = CreateResolver(settingsManager).Preview(AIOperationProviderSettings.NONE, ConfidenceLevel.NONE, new() { FallbackProviderIds = [null, settingsManager.AppDefaultProviderId] }); + + Assert.That(choice.Provider.Id, Is.EqualTo(APP_DEFAULT_PROVIDER_ID)); + } + + [Test] + public void TheOnlyProviderIsTheAppDefault() + { + var settingsManager = CreateSettingsManager(); + AddProvider(settingsManager, FALLBACK_PROVIDER_ID, LLMProviders.SELF_HOSTED); + settingsManager.ConfigurationData.App.PreselectedProvider = DELETED_PROVIDER_ID; + + Assert.That(settingsManager.AppDefaultProviderId, Is.EqualTo(FALLBACK_PROVIDER_ID), "With a single provider, there is nothing else to choose, as in GetPreselectedProvider."); + } + + [Test] + public void WithoutADefaultThereIsNoAppDefault() + { + var settingsManager = CreateSettingsManager(); + AddProvider(settingsManager, FALLBACK_PROVIDER_ID, LLMProviders.SELF_HOSTED); + AddProvider(settingsManager, APP_DEFAULT_PROVIDER_ID, LLMProviders.SELF_HOSTED); + + var choice = CreateResolver(settingsManager).Preview(AIOperationProviderSettings.NONE, ConfidenceLevel.NONE, new() { FallbackProviderIds = [settingsManager.AppDefaultProviderId] }); + + Assert.Multiple(() => + { + Assert.That(choice.HasProvider, Is.False, "Two configured providers are not a choice."); + Assert.That(choice.FallbackIssue, Is.EqualTo(AIOperationProviderIssue.NOT_SET)); + }); + } + + /// + /// Builds a settings manager the way these tests need it. + /// + /// + /// The rust service is handed in as null on purpose: choosing a provider never asks it. + /// + private static SettingsManager CreateSettingsManager() => new(NullLogger.Instance, null!); + + private static AIOperationProviderResolver CreateResolver(SettingsManager settingsManager) => new(settingsManager, NullLogger.Instance); + + private static void AddProvider(SettingsManager settingsManager, string id, LLMProviders llmProvider) + { + var providers = settingsManager.ConfigurationData.Providers; + providers.Add(new((uint)providers.Count + 1, id, $"Instance {providers.Count + 1}", llmProvider, new("test-model", null))); + } +} \ No newline at end of file diff --git a/app/Tests/AIOperations/AIOperationsAreStatelessTests.cs b/app/Tests/AIOperations/AIOperationsAreStatelessTests.cs new file mode 100644 index 000000000..321fca28f --- /dev/null +++ b/app/Tests/AIOperations/AIOperationsAreStatelessTests.cs @@ -0,0 +1,128 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +using AIStudio.AIOperations; + +namespace AIStudio.Tests.AIOperations; + +/// +/// Checks that every AI operation can serve several callers at once. +/// +/// +/// The operations are singletons, so two chats with RAG run the same instance at the same time. Anything an +/// operation stored between calls, such as its provider or its answers, would leak from one call into the +/// other. Only the parameters of a primary constructor may be kept, which hold the services it depends on. +/// +[TestFixture] +public sealed class AIOperationsAreStatelessTests +{ + [Test] + public void TheOperationsAreFound() + { + Assert.That(FindOperationTypes().Select(type => type.Name), Is.SupersetOf(new[] { "TextContentCleaningOperation", "DataSourceChoiceOperation", "RetrievalContextValidationOperation", "PluginAuditOperation" }), "Without the operations, every other test here would pass while checking nothing."); + } + + [Test] + public void NoOperationHasWritableState() + { + foreach (var operationType in FindOperationTypes()) + Assert.That(FindWritableState(operationType), Is.Empty, $"The AI operation '{operationType.Name}' keeps state between calls; keep everything of a call in local variables."); + } + + [Test] + public void EveryOperationIsASingleton() + { + var programSource = ReadProgramSource(); + foreach (var operationType in FindOperationTypes()) + Assert.That(programSource, Does.Contain($"builder.Services.AddSingleton<{operationType.Name}>();"), $"The AI operation '{operationType.Name}' has to be registered as a singleton in Program.cs."); + } + + [Test] + public void EveryOperationReadsItsProviderSettings() + { + foreach (var operationType in FindOperationTypes()) + { + var method = operationType.GetMethod("GetProviderSettings", BindingFlags.Public | BindingFlags.Static, [typeof(AIStudio.Settings.SettingsManager)]); + Assert.That(method?.ReturnType, Is.EqualTo(typeof(AIOperationProviderSettings)), $"The AI operation '{operationType.Name}' needs a public static GetProviderSettings(SettingsManager), see IAIOperation."); + } + } + + /// + /// Checks the check itself, since the operations alone would let it pass while it finds nothing. + /// + [Test] + public void TheCheckFindsWritableState() + { + Assert.Multiple(() => + { + Assert.That(FindWritableState(typeof(StatefulExample)), Is.EquivalentTo(new[] { "StatefulExample.counter", "StatefulExample.Instances", "StatefulExample.Answer", "StatefulExample.Model" })); + Assert.That(FindWritableState(typeof(StatelessExample)), Is.Empty, "Constants, read-only fields, getters, and the parameters of a primary constructor are no state."); + }); + } + + private static IEnumerable FindOperationTypes() => typeof(IAIOperation<,>).Assembly.GetTypes().Where(type => type is { IsClass: true, IsAbstract: false } && type.GetInterfaces().Any(x => x.IsGenericType && x.GetGenericTypeDefinition() == typeof(IAIOperation<,>))); + + /// + /// Lists the fields and properties of a type and its base types which could keep state between calls. + /// + private static List FindWritableState(Type type) + { + const BindingFlags ALL_DECLARED = BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.DeclaredOnly; + + var writable = new List(); + for (var current = type; current is not null && current != typeof(object); current = current.BaseType) + { + foreach (var field in current.GetFields(ALL_DECLARED)) + { + if (field.IsLiteral || field.IsInitOnly) + continue; + + // The backing field of a property, which the properties below cover: + if (field.IsDefined(typeof(CompilerGeneratedAttribute)) && field.Name.EndsWith("k__BackingField", StringComparison.Ordinal)) + continue; + + // A parameter of a primary constructor, which the compiler keeps as a field named P: + if (field.Name.StartsWith('<') && field.Name.EndsWith(">P", StringComparison.Ordinal)) + continue; + + writable.Add($"{current.Name}.{field.Name}"); + } + + foreach (var property in current.GetProperties(ALL_DECLARED)) + if (property.SetMethod is not null) + writable.Add($"{current.Name}.{property.Name}"); + } + + return writable; + } + + private static string ReadProgramSource([CallerFilePath] string sourceFilePath = "") => File.ReadAllText(Path.Combine(Path.GetDirectoryName(sourceFilePath)!, "..", "..", "MindWork AI Studio", "Program.cs")); + + // ReSharper disable UnusedMember.Local + private sealed class StatefulExample + { + private int counter; + + public StatefulExample() => Instances++; + + private static int Instances { get; set; } + + public string Answer { get; set; } = string.Empty; + + public string Model { get; init; } = string.Empty; + + public int Count() => ++this.counter + Instances; + } + + private sealed class StatelessExample(string name) + { + private const int LIMIT = 3; + private static readonly string PREFIX = "prefix"; + private readonly int limit = LIMIT; + + public string Name => $"{PREFIX}{name}{this.limit}"; + + public int Limit { get; } = LIMIT; + } + // ReSharper restore UnusedMember.Local +} \ No newline at end of file diff --git a/app/Tests/AIOperations/DataSourceChoiceProviderTests.cs b/app/Tests/AIOperations/DataSourceChoiceProviderTests.cs new file mode 100644 index 000000000..a2d2dd132 --- /dev/null +++ b/app/Tests/AIOperations/DataSourceChoiceProviderTests.cs @@ -0,0 +1,167 @@ +using AIStudio.AIOperations; +using AIStudio.AIOperations.DataSourceChoice; +using AIStudio.Provider; +using AIStudio.Settings; +using AIStudio.Settings.DataModel; +using AIStudio.Tools.RAG.DataSourceSelectionProcesses; + +using Microsoft.Extensions.Logging.Abstractions; + +namespace AIStudio.Tests.AIOperations; + +/// +/// Checks which provider selects the data sources in the classic RAG process. +/// +/// +/// The provider reads the descriptions of the data sources, and what it chooses decides what is searched. +/// It therefore has to be allowed to see them, by their security and by the confidence they require, and a +/// provider which is not falls back on the provider of the chat, which the chat already checked. Names are +/// written out in full where a short one would find a namespace of this assembly first. +/// +[TestFixture] +public sealed class DataSourceChoiceProviderTests +{ + private const string CHAT_PROVIDER_ID = "11111111-1111-1111-1111-111111111111"; + private const string OWN_PROVIDER_ID = "22222222-2222-2222-2222-222222222222"; + + [Test] + public void FallsBackToTheChatProvider() + { + var settingsManager = CreateSettingsManager(); + AddProvider(settingsManager, CHAT_PROVIDER_ID, LLMProviders.OPEN_AI); + AddProvider(settingsManager, OWN_PROVIDER_ID, LLMProviders.MISTRAL); + + var choice = Choose(settingsManager, [OpenServer()]); + + Assert.That(choice.Provider.Id, Is.EqualTo(CHAT_PROVIDER_ID)); + } + + [Test] + public void PrefersItsOwnProvider() + { + var settingsManager = CreateSettingsManager(); + AddProvider(settingsManager, CHAT_PROVIDER_ID, LLMProviders.OPEN_AI); + AddProvider(settingsManager, OWN_PROVIDER_ID, LLMProviders.MISTRAL); + PickOwnProvider(settingsManager); + + var choice = Choose(settingsManager, [OpenServer()]); + + Assert.That(choice.Provider.Id, Is.EqualTo(OWN_PROVIDER_ID)); + } + + /// + /// Checks that a provider which must not see a data source falls back instead of ending the selection. + /// + /// + /// A server for self-hosted providers refuses a cloud provider. The provider of the chat, a self-hosted + /// one, may see it, and the chat already uses it for the very same data. + /// + [Test] + public void AnOwnProviderRefusedByTheSecurityOfADataSourceFallsBack() + { + var settingsManager = CreateSettingsManager(); + AddProvider(settingsManager, CHAT_PROVIDER_ID, LLMProviders.SELF_HOSTED, isSelfHosted: true); + AddProvider(settingsManager, OWN_PROVIDER_ID, LLMProviders.MISTRAL); + PickOwnProvider(settingsManager); + + var choice = Choose(settingsManager, [SelfHostedServer()]); + + Assert.Multiple(() => + { + Assert.That(choice.Provider.Id, Is.EqualTo(CHAT_PROVIDER_ID)); + Assert.That(choice.PreferredIssue, Is.EqualTo(AIOperationProviderIssue.NOT_ALLOWED_FOR_CONTENT)); + }); + } + + [Test] + public void AnOwnProviderBelowWhatADataSourceRequiresFallsBack() + { + var settingsManager = CreateSettingsManager(); + AddProvider(settingsManager, CHAT_PROVIDER_ID, LLMProviders.SELF_HOSTED, isSelfHosted: true); + AddProvider(settingsManager, OWN_PROVIDER_ID, LLMProviders.MISTRAL); + PickOwnProvider(settingsManager); + + var choice = Choose(settingsManager, [LocalDirectory(ConfidenceLevel.HIGH)]); + + Assert.Multiple(() => + { + Assert.That(choice.Provider.Id, Is.EqualTo(CHAT_PROVIDER_ID)); + Assert.That(choice.PreferredIssue, Is.EqualTo(AIOperationProviderIssue.NOT_ALLOWED_FOR_CONTENT)); + }); + } + + [Test] + public void NoProviderWhenNoneMaySeeTheDataSources() + { + var settingsManager = CreateSettingsManager(); + AddProvider(settingsManager, CHAT_PROVIDER_ID, LLMProviders.OPEN_AI); + AddProvider(settingsManager, OWN_PROVIDER_ID, LLMProviders.MISTRAL); + PickOwnProvider(settingsManager); + + var choice = Choose(settingsManager, [SelfHostedServer()]); + + Assert.Multiple(() => + { + Assert.That(choice.HasProvider, Is.False, "No provider may read the descriptions of a server it must not see."); + Assert.That(choice.FallbackIssue, Is.EqualTo(AIOperationProviderIssue.NOT_ALLOWED_FOR_CONTENT)); + }); + } + + [Test] + public void ItsOwnMinimumAppliesToTheChatProvider() + { + var settingsManager = CreateSettingsManager(); + AddProvider(settingsManager, CHAT_PROVIDER_ID, LLMProviders.OPEN_AI); + AddProvider(settingsManager, OWN_PROVIDER_ID, LLMProviders.MISTRAL); + settingsManager.ConfigurationData.AgentDataSourceSelection.PreselectAgentOptions = true; + settingsManager.ConfigurationData.AgentDataSourceSelection.MinimumProviderConfidence = ConfidenceLevel.HIGH; + + var choice = Choose(settingsManager, [OpenServer()]); + + Assert.That(choice.HasProvider, Is.False); + } + + private static AIOperationProviderChoice Choose(SettingsManager settingsManager, IReadOnlyList dataSources) + { + var resolver = new AIOperationProviderResolver(settingsManager, NullLogger.Instance); + return resolver.Preview(DataSourceChoiceOperation.GetProviderSettings(settingsManager), dataSources.GetRequiredConfidenceLevel(), AgenticSrcSelWithDynHeur.GetChoiceProviderOptions(settingsManager, CHAT_PROVIDER_ID, dataSources)); + } + + private static void PickOwnProvider(SettingsManager settingsManager) + { + settingsManager.ConfigurationData.AgentDataSourceSelection.PreselectAgentOptions = true; + settingsManager.ConfigurationData.AgentDataSourceSelection.PreselectedAgentProvider = OWN_PROVIDER_ID; + } + + private static IDataSource OpenServer() => new DataSourceERI_V1 + { + Id = "2a8d5f1c-7e3b-4c9a-b6d2-5f8e1a3c7b49", + Name = "Server for any provider", + SecurityPolicy = DataSourceSecurity.ALLOW_ANY, + }; + + private static IDataSource SelfHostedServer() => new DataSourceERI_V1 + { + Id = "9e4a2c7f-5b1d-4f6e-a8c3-1d7b4e9f2a65", + Name = "Server for self-hosted providers", + SecurityPolicy = DataSourceSecurity.SELF_HOSTED, + }; + + private static IDataSource LocalDirectory(ConfidenceLevel confidenceLevel) => new DataSourceLocalDirectory + { + Id = "5c1e9a7d-3f2b-4e8a-9d6c-7b4a2e1f8c35", + Name = "Handbook", + ConfidenceLevel = confidenceLevel, + }; + + /// + /// Builds a settings manager without the rust service, which choosing a provider never asks. + /// + private static SettingsManager CreateSettingsManager() => new(NullLogger.Instance, null!); + + private static void AddProvider(SettingsManager settingsManager, string id, LLMProviders llmProvider, bool isSelfHosted = false) + { + var providers = settingsManager.ConfigurationData.Providers; + providers.Add(new((uint)providers.Count + 1, id, $"Instance {providers.Count + 1}", llmProvider, new("test-model", null), IsSelfHosted: isSelfHosted)); + } +} \ No newline at end of file diff --git a/app/Tests/AIOperations/PluginAuditProviderTests.cs b/app/Tests/AIOperations/PluginAuditProviderTests.cs new file mode 100644 index 000000000..46a57dadf --- /dev/null +++ b/app/Tests/AIOperations/PluginAuditProviderTests.cs @@ -0,0 +1,170 @@ +using AIStudio.AIOperations; +using AIStudio.AIOperations.PluginAudit; +using AIStudio.Provider; +using AIStudio.Settings; +using AIStudio.Tools.PluginSystem.Assistants; + +using Microsoft.Extensions.Logging.Abstractions; + +namespace AIStudio.Tests.AIOperations; + +/// +/// Checks which provider audits a plugin. +/// +/// +/// The audit may be given a model of its own, which an organization rolls out. Without one, it falls back on +/// the app-wide default, and then on the provider at hand: the one picked in the audit dialog, or for the +/// assistant being built. Names are written out in full where a short one would find a namespace of this +/// assembly first, see AIOperationProviderResolverTests. +/// +[TestFixture] +public sealed class PluginAuditProviderTests +{ + private const string AT_HAND_PROVIDER_ID = "11111111-1111-1111-1111-111111111111"; + private const string AUDIT_PROVIDER_ID = "22222222-2222-2222-2222-222222222222"; + private const string APP_DEFAULT_PROVIDER_ID = "33333333-3333-3333-3333-333333333333"; + + /// + /// Checks that the audit's provider needs no switch to be used. + /// + /// + /// Unlike the content cleaner, the audit has no "preselect options" flag: an organization rolls its + /// provider out and that is what audits run with. A test which assumed the two behaved alike would + /// pass here for the wrong reason. + /// + [Test] + public void UsesItsOwnProviderWithoutAPreselectionSwitch() + { + var settingsManager = CreateSettingsManager(); + AddProvider(settingsManager, AUDIT_PROVIDER_ID, LLMProviders.MISTRAL); + AddProvider(settingsManager, APP_DEFAULT_PROVIDER_ID, LLMProviders.OPEN_AI); + settingsManager.ConfigurationData.App.PreselectedProvider = APP_DEFAULT_PROVIDER_ID; + settingsManager.ConfigurationData.AssistantPluginAudit.PreselectedAgentProvider = AUDIT_PROVIDER_ID; + + var choice = Choose(settingsManager, null); + + Assert.That(choice.Provider.Id, Is.EqualTo(AUDIT_PROVIDER_ID), "A provider rolled out for audits outranks the app-wide default."); + } + + [Test] + public void FallsBackToTheAppDefault() + { + var settingsManager = CreateSettingsManager(); + AddProvider(settingsManager, AT_HAND_PROVIDER_ID, LLMProviders.OPEN_AI); + AddProvider(settingsManager, APP_DEFAULT_PROVIDER_ID, LLMProviders.MISTRAL); + settingsManager.ConfigurationData.App.PreselectedProvider = APP_DEFAULT_PROVIDER_ID; + + var choice = Choose(settingsManager, null); + + Assert.That(choice.Provider.Id, Is.EqualTo(APP_DEFAULT_PROVIDER_ID), "Without a dedicated audit provider, the app-wide default is what audits run with."); + } + + /// + /// Checks the state the audit dialog was useless in before it offered a provider itself. + /// + [Test] + public void EndsUpWithNothingWhenNeitherIsConfigured() + { + var settingsManager = CreateSettingsManager(); + AddProvider(settingsManager, AT_HAND_PROVIDER_ID, LLMProviders.OPEN_AI); + AddProvider(settingsManager, AUDIT_PROVIDER_ID, LLMProviders.MISTRAL); + + var choice = Choose(settingsManager, null); + + Assert.Multiple(() => + { + Assert.That(choice.HasProvider, Is.False, "Two configured providers are not a choice: without one being named for audits, the audit has none."); + Assert.That(AssistantPluginAuditService.GetRelevantIssue(choice), Is.EqualTo(AIOperationProviderIssue.NOT_SET), "The dialog then says that nothing is set, not that something is wrong."); + }); + } + + [Test] + public void RejectsAnAppDefaultBelowTheGlobalMinimum() + { + var settingsManager = CreateSettingsManager(); + AddProvider(settingsManager, AT_HAND_PROVIDER_ID, LLMProviders.SELF_HOSTED); + AddProvider(settingsManager, APP_DEFAULT_PROVIDER_ID, LLMProviders.OPEN_AI); + settingsManager.ConfigurationData.App.PreselectedProvider = APP_DEFAULT_PROVIDER_ID; + settingsManager.ConfigurationData.Confidence.EnforceGlobalMinimumConfidence = true; + settingsManager.ConfigurationData.Confidence.GlobalMinimumConfidence = ConfidenceLevel.HIGH; + + var choice = Choose(settingsManager, null); + + Assert.Multiple(() => + { + Assert.That(choice.HasProvider, Is.False, "The app-wide default is not exempt from what the organization enforces."); + Assert.That(AssistantPluginAuditService.GetRelevantIssue(choice), Is.EqualTo(AIOperationProviderIssue.BELOW_MINIMUM_CONFIDENCE)); + }); + } + + [Test] + public void FallsBackToTheProviderAtHandLast() + { + var settingsManager = CreateSettingsManager(); + var providerAtHand = AddProvider(settingsManager, AT_HAND_PROVIDER_ID, LLMProviders.OPEN_AI); + AddProvider(settingsManager, AUDIT_PROVIDER_ID, LLMProviders.MISTRAL); + + var choice = Choose(settingsManager, providerAtHand); + + Assert.That(choice.Provider.Id, Is.EqualTo(AT_HAND_PROVIDER_ID)); + } + + [Test] + public void TheAppDefaultComesBeforeTheProviderAtHand() + { + var settingsManager = CreateSettingsManager(); + var providerAtHand = AddProvider(settingsManager, AT_HAND_PROVIDER_ID, LLMProviders.OPEN_AI); + AddProvider(settingsManager, APP_DEFAULT_PROVIDER_ID, LLMProviders.MISTRAL); + settingsManager.ConfigurationData.App.PreselectedProvider = APP_DEFAULT_PROVIDER_ID; + + var choice = Choose(settingsManager, providerAtHand); + + Assert.That(choice.Provider.Id, Is.EqualTo(APP_DEFAULT_PROVIDER_ID)); + } + + /// + /// Checks that a provider picked for something else clears the bar of the audit before it reads a plugin. + /// + [Test] + public void ItsOwnMinimumAppliesToTheProviderAtHand() + { + var settingsManager = CreateSettingsManager(); + var providerAtHand = AddProvider(settingsManager, AT_HAND_PROVIDER_ID, LLMProviders.OPEN_AI); + AddProvider(settingsManager, AUDIT_PROVIDER_ID, LLMProviders.MISTRAL); + settingsManager.ConfigurationData.AssistantPluginAudit.MinimumProviderConfidence = ConfidenceLevel.HIGH; + + var choice = Choose(settingsManager, providerAtHand); + + Assert.Multiple(() => + { + Assert.That(choice.HasProvider, Is.False, "A provider an organization ruled out for audits must not read a plugin because it was at hand."); + Assert.That(AssistantPluginAuditService.GetRelevantIssue(choice), Is.EqualTo(AIOperationProviderIssue.BELOW_MINIMUM_CONFIDENCE)); + }); + } + + private static AIOperationProviderChoice Choose(SettingsManager settingsManager, AIStudio.Settings.Provider? providerAtHand) + { + var resolver = new AIOperationProviderResolver(settingsManager, NullLogger.Instance); + return resolver.Preview(PluginAuditOperation.GetProviderSettings(settingsManager), ConfidenceLevel.NONE, AssistantPluginAuditService.GetProviderOptions(settingsManager, providerAtHand)); + } + + /// + /// Builds a settings manager without the rust service, which choosing a provider never asks. + /// + private static SettingsManager CreateSettingsManager() => new(NullLogger.Instance, null!); + + /// + /// Adds a provider to the settings. + /// + /// + /// Every test here configures at least two of them: with exactly one configured provider, it is the + /// app-wide default whatever the settings name, and a test would pass no matter what the fallback does. + /// + private static AIStudio.Settings.Provider AddProvider(SettingsManager settingsManager, string id, LLMProviders llmProvider) + { + var providers = settingsManager.ConfigurationData.Providers; + var provider = new AIStudio.Settings.Provider((uint)providers.Count + 1, id, $"Instance {providers.Count + 1}", llmProvider, new("test-model", null)); + providers.Add(provider); + return provider; + } +} \ No newline at end of file diff --git a/app/Tests/AIOperations/RetrievalContextValidationProviderTests.cs b/app/Tests/AIOperations/RetrievalContextValidationProviderTests.cs new file mode 100644 index 000000000..ed74b4d5a --- /dev/null +++ b/app/Tests/AIOperations/RetrievalContextValidationProviderTests.cs @@ -0,0 +1,95 @@ +using AIStudio.AIOperations; +using AIStudio.AIOperations.RetrievalContextValidation; +using AIStudio.Provider; +using AIStudio.Settings; +using AIStudio.Settings.DataModel; +using AIStudio.Tools.RAG; + +using Microsoft.Extensions.Logging.Abstractions; + +namespace AIStudio.Tests.AIOperations; + +/// +/// Checks which provider validates the passages which the classic RAG process found. +/// +/// +/// The provider reads the passages, so it has to meet what the chat requires of every provider which reads +/// its data: the data security and the confidence. A provider which does not falls back on the provider of +/// the chat. Names are written out in full where a short one would find a namespace of this assembly first. +/// +[TestFixture] +public sealed class RetrievalContextValidationProviderTests +{ + private const string CHAT_PROVIDER_ID = "11111111-1111-1111-1111-111111111111"; + private const string OWN_PROVIDER_ID = "22222222-2222-2222-2222-222222222222"; + + [Test] + public void PrefersItsOwnProvider() + { + var settingsManager = CreateSettingsManager(); + AddProvider(settingsManager, CHAT_PROVIDER_ID, LLMProviders.OPEN_AI); + AddProvider(settingsManager, OWN_PROVIDER_ID, LLMProviders.MISTRAL); + PickOwnProvider(settingsManager); + + var choice = Choose(settingsManager, DataSourceSecurity.ALLOW_ANY, ConfidenceLevel.NONE); + + Assert.That(choice.Provider.Id, Is.EqualTo(OWN_PROVIDER_ID)); + } + + [Test] + public void AnOwnProviderRefusedByTheDataSecurityOfTheChatFallsBack() + { + var settingsManager = CreateSettingsManager(); + AddProvider(settingsManager, CHAT_PROVIDER_ID, LLMProviders.SELF_HOSTED, isSelfHosted: true); + AddProvider(settingsManager, OWN_PROVIDER_ID, LLMProviders.MISTRAL); + PickOwnProvider(settingsManager); + + var choice = Choose(settingsManager, DataSourceSecurity.SELF_HOSTED, ConfidenceLevel.NONE); + + Assert.Multiple(() => + { + Assert.That(choice.Provider.Id, Is.EqualTo(CHAT_PROVIDER_ID), "Passages from a server for self-hosted providers must not reach a cloud provider through the validation."); + Assert.That(choice.PreferredIssue, Is.EqualTo(AIOperationProviderIssue.NOT_ALLOWED_FOR_CONTENT)); + }); + } + + [Test] + public void AnOwnProviderBelowTheConfidenceOfTheChatFallsBack() + { + var settingsManager = CreateSettingsManager(); + AddProvider(settingsManager, CHAT_PROVIDER_ID, LLMProviders.SELF_HOSTED, isSelfHosted: true); + AddProvider(settingsManager, OWN_PROVIDER_ID, LLMProviders.MISTRAL); + PickOwnProvider(settingsManager); + + var choice = Choose(settingsManager, DataSourceSecurity.ALLOW_ANY, ConfidenceLevel.HIGH); + + Assert.Multiple(() => + { + Assert.That(choice.Provider.Id, Is.EqualTo(CHAT_PROVIDER_ID)); + Assert.That(choice.PreferredIssue, Is.EqualTo(AIOperationProviderIssue.NOT_ALLOWED_FOR_CONTENT)); + }); + } + + private static AIOperationProviderChoice Choose(SettingsManager settingsManager, DataSourceSecurity dataSecurity, ConfidenceLevel requiredConfidence) + { + var resolver = new AIOperationProviderResolver(settingsManager, NullLogger.Instance); + return resolver.Preview(RetrievalContextValidationOperation.GetProviderSettings(settingsManager), requiredConfidence, ClassicRagProviderOptions.ForDataAccess(settingsManager, CHAT_PROVIDER_ID, dataSecurity, requiredConfidence)); + } + + private static void PickOwnProvider(SettingsManager settingsManager) + { + settingsManager.ConfigurationData.AgentRetrievalContextValidation.PreselectAgentOptions = true; + settingsManager.ConfigurationData.AgentRetrievalContextValidation.PreselectedAgentProvider = OWN_PROVIDER_ID; + } + + /// + /// Builds a settings manager without the rust service, which choosing a provider never asks. + /// + private static SettingsManager CreateSettingsManager() => new(NullLogger.Instance, null!); + + private static void AddProvider(SettingsManager settingsManager, string id, LLMProviders llmProvider, bool isSelfHosted = false) + { + var providers = settingsManager.ConfigurationData.Providers; + providers.Add(new((uint)providers.Count + 1, id, $"Instance {providers.Count + 1}", llmProvider, new("test-model", null), IsSelfHosted: isSelfHosted)); + } +} \ No newline at end of file diff --git a/app/Tests/AIOperations/TextContentCleaningProviderTests.cs b/app/Tests/AIOperations/TextContentCleaningProviderTests.cs new file mode 100644 index 000000000..8252fb189 --- /dev/null +++ b/app/Tests/AIOperations/TextContentCleaningProviderTests.cs @@ -0,0 +1,176 @@ +using AIStudio.AIOperations; +using AIStudio.AIOperations.TextContentCleaning; +using AIStudio.Provider; +using AIStudio.Settings; + +using Microsoft.Extensions.Logging.Abstractions; + +namespace AIStudio.Tests.AIOperations; + +/// +/// Checks which provider the text content cleaner is handed when a web page is read in an assistant. +/// +/// +/// The cleaner may be given a model of its own, because a small and cheap one is enough for what it does. +/// Almost nobody does that, so what matters in practice is what happens when it has none: the model of the +/// assistant it sits in, the app-wide default, or nothing at all. Two bugs shipped in that fallback, which is +/// why it is pinned down here, with the options the reader passes. The component lifecycle itself is not +/// covered; there is no bUnit in this solution. Names are written out in full where a short one would find a +/// namespace of this assembly first, see AIOperationProviderResolverTests. +/// +[TestFixture] +public sealed class TextContentCleaningProviderTests +{ + private const string ASSISTANT_PROVIDER_ID = "11111111-1111-1111-1111-111111111111"; + private const string CLEANER_PROVIDER_ID = "22222222-2222-2222-2222-222222222222"; + private const string APP_DEFAULT_PROVIDER_ID = "33333333-3333-3333-3333-333333333333"; + + [Test] + public void FallsBackToTheAssistantProvider() + { + var settingsManager = CreateSettingsManager(); + var assistantProvider = AddProvider(settingsManager, ASSISTANT_PROVIDER_ID, LLMProviders.OPEN_AI); + AddProvider(settingsManager, CLEANER_PROVIDER_ID, LLMProviders.MISTRAL); + + var choice = Choose(settingsManager, assistantProvider); + + Assert.That(choice.Provider.Id, Is.EqualTo(ASSISTANT_PROVIDER_ID), "With nothing configured for the cleaner, it has to use the model of the assistant around it."); + } + + [Test] + public void FallsBackToTheAppDefault() + { + var settingsManager = CreateSettingsManager(); + AddProvider(settingsManager, ASSISTANT_PROVIDER_ID, LLMProviders.OPEN_AI); + AddProvider(settingsManager, APP_DEFAULT_PROVIDER_ID, LLMProviders.MISTRAL); + settingsManager.ConfigurationData.App.PreselectedProvider = APP_DEFAULT_PROVIDER_ID; + + var choice = Choose(settingsManager, AIStudio.Settings.Provider.NONE); + + Assert.That(choice.Provider.Id, Is.EqualTo(APP_DEFAULT_PROVIDER_ID), "Without an assistant model, the app-wide default is what is left before giving up."); + } + + [Test] + public void PrefersItsOwnProviderOverTheAssistantOne() + { + var settingsManager = CreateSettingsManager(); + var assistantProvider = AddProvider(settingsManager, ASSISTANT_PROVIDER_ID, LLMProviders.OPEN_AI); + AddProvider(settingsManager, CLEANER_PROVIDER_ID, LLMProviders.MISTRAL); + settingsManager.ConfigurationData.TextContentCleaner.PreselectAgentOptions = true; + settingsManager.ConfigurationData.TextContentCleaner.PreselectedAgentProvider = CLEANER_PROVIDER_ID; + + var choice = Choose(settingsManager, assistantProvider); + + Assert.That(choice.Provider.Id, Is.EqualTo(CLEANER_PROVIDER_ID), "A model picked for the cleaner is the whole point of picking one, so it outranks the assistant's."); + } + + /// + /// Checks that the switch above the cleaner's provider field really turns that provider off. + /// + /// + /// The provider id stays in the settings when the switch goes off, so the only thing saying it + /// must not be used is this one flag. Settings which hand out the stored id instead of asking the + /// flag would keep using a provider the user switched away from. + /// + [Test] + public void IgnoresItsOwnProviderWhenPreselectionIsOff() + { + var settingsManager = CreateSettingsManager(); + var assistantProvider = AddProvider(settingsManager, ASSISTANT_PROVIDER_ID, LLMProviders.OPEN_AI); + AddProvider(settingsManager, CLEANER_PROVIDER_ID, LLMProviders.MISTRAL); + settingsManager.ConfigurationData.TextContentCleaner.PreselectAgentOptions = false; + settingsManager.ConfigurationData.TextContentCleaner.PreselectedAgentProvider = CLEANER_PROVIDER_ID; + + var choice = Choose(settingsManager, assistantProvider); + + Assert.That(choice.Provider.Id, Is.EqualTo(ASSISTANT_PROVIDER_ID), "With its preselection switched off, the cleaner has to fall back to the assistant's model."); + } + + /// + /// Checks that a model too untrusted for the cleaner is not used just because it is there. + /// + /// + /// This is the case the user meets as a hint next to the cleaner switch: a model is selected in + /// the assistant, and the cleaner still has none. Under TRUST_ALL every provider reaches MEDIUM + /// and a self-hosted one reaches HIGH, so a minimum of HIGH separates the two. + /// + [Test] + public void RejectsAnAssistantProviderBelowTheGlobalMinimum() + { + var settingsManager = CreateSettingsManager(); + var assistantProvider = AddProvider(settingsManager, ASSISTANT_PROVIDER_ID, LLMProviders.OPEN_AI); + AddProvider(settingsManager, CLEANER_PROVIDER_ID, LLMProviders.MISTRAL); + settingsManager.ConfigurationData.Confidence.EnforceGlobalMinimumConfidence = true; + settingsManager.ConfigurationData.Confidence.GlobalMinimumConfidence = ConfidenceLevel.HIGH; + + var choice = Choose(settingsManager, assistantProvider); + + Assert.Multiple(() => + { + Assert.That(choice.HasProvider, Is.False, "A provider the organization ruled out must not reach the cleaner through the assistant."); + Assert.That(choice.FallbackIssue, Is.EqualTo(AIOperationProviderIssue.BELOW_MINIMUM_CONFIDENCE), "The hint next to the switch tells this reason from a missing model."); + }); + } + + [Test] + public void AcceptsAnAssistantProviderMeetingTheGlobalMinimum() + { + var settingsManager = CreateSettingsManager(); + var assistantProvider = AddProvider(settingsManager, ASSISTANT_PROVIDER_ID, LLMProviders.SELF_HOSTED); + AddProvider(settingsManager, CLEANER_PROVIDER_ID, LLMProviders.MISTRAL); + settingsManager.ConfigurationData.Confidence.EnforceGlobalMinimumConfidence = true; + settingsManager.ConfigurationData.Confidence.GlobalMinimumConfidence = ConfidenceLevel.HIGH; + + var choice = Choose(settingsManager, assistantProvider); + + Assert.That(choice.Provider.Id, Is.EqualTo(ASSISTANT_PROVIDER_ID), "A provider which clears the bar has to be handed over, or the hint would never go away."); + } + + /// + /// Checks that the minimum of the cleaner itself applies to the model of the assistant as well. + /// + /// + /// Whether a model may read the page is decided by what the cleaner requires, not by what the model was + /// picked for. Otherwise a model ruled out for the cleaner would clean the page anyway. + /// + [Test] + public void ItsOwnMinimumAppliesToTheAssistantProvider() + { + var settingsManager = CreateSettingsManager(); + var assistantProvider = AddProvider(settingsManager, ASSISTANT_PROVIDER_ID, LLMProviders.OPEN_AI); + AddProvider(settingsManager, CLEANER_PROVIDER_ID, LLMProviders.MISTRAL); + settingsManager.ConfigurationData.TextContentCleaner.PreselectAgentOptions = true; + settingsManager.ConfigurationData.TextContentCleaner.MinimumProviderConfidence = ConfidenceLevel.HIGH; + + var choice = Choose(settingsManager, assistantProvider); + + Assert.That(choice.HasProvider, Is.False); + } + + private static AIOperationProviderChoice Choose(SettingsManager settingsManager, AIStudio.Settings.Provider assistantProvider) + { + var resolver = new AIOperationProviderResolver(settingsManager, NullLogger.Instance); + return resolver.Preview(TextContentCleaningOperation.GetProviderSettings(settingsManager), ConfidenceLevel.NONE, AIStudio.Components.ReadWebContent.GetCleanerProviderOptions(settingsManager, assistantProvider)); + } + + /// + /// Builds a settings manager without the rust service, which choosing a provider never asks. + /// + private static SettingsManager CreateSettingsManager() => new(NullLogger.Instance, null!); + + /// + /// Adds a provider to the settings. + /// + /// + /// Every test here configures at least two of them, and not for variety: with exactly one configured + /// provider, it is the app-wide default whatever the settings name. A single-provider test would pass no + /// matter what the fallback does. + /// + private static AIStudio.Settings.Provider AddProvider(SettingsManager settingsManager, string id, LLMProviders llmProvider) + { + var providers = settingsManager.ConfigurationData.Providers; + var provider = new AIStudio.Settings.Provider((uint)providers.Count + 1, id, $"Instance {providers.Count + 1}", llmProvider, new("test-model", null)); + providers.Add(provider); + return provider; + } +} \ No newline at end of file diff --git a/app/Tests/Chat/ChatThreadRollbackTests.cs b/app/Tests/Chat/ChatThreadRollbackTests.cs index f6c64b058..1f1df622d 100644 --- a/app/Tests/Chat/ChatThreadRollbackTests.cs +++ b/app/Tests/Chat/ChatThreadRollbackTests.cs @@ -1,4 +1,4 @@ -using AIStudio.Agents; +using AIStudio.AIOperations.DataSourceChoice; using AIStudio.Chat; using AIStudio.Components; using AIStudio.Provider; @@ -120,7 +120,7 @@ public sealed class ChatThreadRollbackTests using (Assert.EnterMultipleScope()) { Assert.That(thread.AugmentedData, Is.Empty, "Nobody knows whether the retrieved data belongs to a kept or to a removed message, so it must not reach the next system prompt."); - Assert.That(thread.AISelectedDataSources, Is.Empty, "The data sources an agent picked belong to the same retrieval as the data."); + Assert.That(thread.AISelectedDataSources, Is.Empty, "The data sources an AI operation picked belong to the same retrieval as the data."); Assert.That(thread.DataSourceOptions, Is.SameAs(options), "The data source options are the user's choice, not the result of a message."); Assert.That(options.DisableDataSources, Is.False); Assert.That(options.AutomaticDataSourceSelection, Is.True); diff --git a/app/Tests/Serialization/JsonTestRoots.ModelAnswers.cs b/app/Tests/Serialization/JsonTestRoots.ModelAnswers.cs index 9a39fe3ba..549a082c9 100644 --- a/app/Tests/Serialization/JsonTestRoots.ModelAnswers.cs +++ b/app/Tests/Serialization/JsonTestRoots.ModelAnswers.cs @@ -1,5 +1,7 @@ -using AIStudio.Agents; -using AIStudio.Agents.AssistantAudit; +using AIStudio.AIOperations; +using AIStudio.AIOperations.DataSourceChoice; +using AIStudio.AIOperations.PluginAudit; +using AIStudio.AIOperations.RetrievalContextValidation; using AIStudio.Assistants.BeyondFactsLab; using AIStudio.Assistants.Builder; using AIStudio.Assistants.ERI; @@ -14,17 +16,17 @@ namespace AIStudio.Tests.Serialization; public static partial class JsonTestRoots { /// - /// The JSON which models write for the agents and assistants of AI Studio, apart from the Visual Briefing + /// The JSON which models write for the AI operations and assistants of AI Studio, apart from the Visual Briefing /// assistant. /// public static IEnumerable ModelAnswers() { TestHost.PrepareStaticState(); - // The agents, which select data sources, check retrieved passages, and audit assistant plugins: - yield return Case(new(typeof(List), AgentBase.JSON_SERIALIZER_OPTIONS)); - yield return Case(new(typeof(RetrievalContextValidationResult), AgentBase.JSON_SERIALIZER_OPTIONS)); - yield return Case(new(typeof(AssistantAuditResult), AgentBase.JSON_SERIALIZER_OPTIONS)); + // The AI operations, which select data sources, check retrieved passages, and audit assistant plugins: + yield return Case(new(typeof(List), AIOperationsJson.OPTIONS)); + yield return Case(new(typeof(RetrievalContextValidationResult), AIOperationsJson.OPTIONS)); + yield return Case(new(typeof(PluginAuditResult), AIOperationsJson.OPTIONS)); // The Assistant Builder, for assistant plugins and for direct chat launchers: yield return Case(new(typeof(LuaResponse), LuaResponse.JSON_OPTIONS)); diff --git a/app/Tests/Settings/BackgroundTaskMinimumConfidenceTests.cs b/app/Tests/Settings/BackgroundTaskMinimumConfidenceTests.cs new file mode 100644 index 000000000..1e737fcec --- /dev/null +++ b/app/Tests/Settings/BackgroundTaskMinimumConfidenceTests.cs @@ -0,0 +1,75 @@ +using AIStudio.Provider; +using AIStudio.Settings; + +using Microsoft.Extensions.Logging.Abstractions; + +namespace AIStudio.Tests.Settings; + +/// +/// Checks when the minimum confidence of a background task applies. +/// +/// +/// The text content cleaner, the data source selection, and the retrieval context validation apply their +/// provider and their minimum only while their preselection is switched on, like the assistants. The audit +/// of plugins has no such switch, so its minimum always applies. Names are written out in full where a short +/// one would find a namespace of this assembly first, see AIOperationProviderResolverTests. +/// +[TestFixture] +public sealed class BackgroundTaskMinimumConfidenceTests +{ + [Test] + public void TheTextContentCleanerAppliesItsMinimumOnlyWithItsPreselection() + { + var settingsManager = CreateSettingsManager(); + settingsManager.ConfigurationData.TextContentCleaner.MinimumProviderConfidence = ConfidenceLevel.HIGH; + + AssertMinimumFollowsPreselection(settingsManager, AIStudio.Tools.Components.AGENT_TEXT_CONTENT_CLEANER, on => settingsManager.ConfigurationData.TextContentCleaner.PreselectAgentOptions = on); + } + + [Test] + public void TheDataSourceSelectionAppliesItsMinimumOnlyWithItsPreselection() + { + var settingsManager = CreateSettingsManager(); + settingsManager.ConfigurationData.AgentDataSourceSelection.MinimumProviderConfidence = ConfidenceLevel.HIGH; + + AssertMinimumFollowsPreselection(settingsManager, AIStudio.Tools.Components.AGENT_DATA_SOURCE_SELECTION, on => settingsManager.ConfigurationData.AgentDataSourceSelection.PreselectAgentOptions = on); + } + + [Test] + public void TheRetrievalContextValidationAppliesItsMinimumOnlyWithItsPreselection() + { + var settingsManager = CreateSettingsManager(); + settingsManager.ConfigurationData.AgentRetrievalContextValidation.MinimumProviderConfidence = ConfidenceLevel.HIGH; + + AssertMinimumFollowsPreselection(settingsManager, AIStudio.Tools.Components.AGENT_RETRIEVAL_CONTEXT_VALIDATION, on => settingsManager.ConfigurationData.AgentRetrievalContextValidation.PreselectAgentOptions = on); + } + + [Test] + public void ThePluginAuditAlwaysAppliesItsMinimum() + { + var settingsManager = CreateSettingsManager(); + settingsManager.ConfigurationData.AssistantPluginAudit.MinimumProviderConfidence = ConfidenceLevel.HIGH; + + Assert.That(AIStudio.Tools.ComponentsExtensions.MinimumConfidence(AIStudio.Tools.Components.AGENT_ASSISTANT_PLUGIN_AUDIT, settingsManager), Is.EqualTo(ConfidenceLevel.HIGH), "The audit has no preselection switch, so nothing may turn its minimum off."); + } + + private static void AssertMinimumFollowsPreselection(SettingsManager settingsManager, AIStudio.Tools.Components component, Action setPreselection) + { + setPreselection(false); + var minimumWithoutPreselection = AIStudio.Tools.ComponentsExtensions.MinimumConfidence(component, settingsManager); + + setPreselection(true); + var minimumWithPreselection = AIStudio.Tools.ComponentsExtensions.MinimumConfidence(component, settingsManager); + + Assert.Multiple(() => + { + Assert.That(minimumWithoutPreselection, Is.EqualTo(ConfidenceLevel.NONE), "With the preselection switched off, the stored minimum must not apply."); + Assert.That(minimumWithPreselection, Is.EqualTo(ConfidenceLevel.HIGH)); + }); + } + + /// + /// Builds a settings manager without the rust service, which reading a minimum never asks. + /// + private static SettingsManager CreateSettingsManager() => new(NullLogger.Instance, null!); +} \ No newline at end of file diff --git a/app/Tests/Settings/ChatTemplateConfigurationTests.cs b/app/Tests/Settings/ChatTemplateConfigurationTests.cs index a6f921c19..fa0f690b7 100644 --- a/app/Tests/Settings/ChatTemplateConfigurationTests.cs +++ b/app/Tests/Settings/ChatTemplateConfigurationTests.cs @@ -73,7 +73,7 @@ public sealed class ChatTemplateConfigurationTests using (Assert.EnterMultipleScope()) { Assert.That(read.DataSourceOptions, Is.Not.Null); - Assert.That(read.DataSourceOptions!.AutomaticDataSourceSelection, Is.True, "Letting an agent pick the sources is the one thing only a chat template can state, so it must not be lost on the way through Lua."); + Assert.That(read.DataSourceOptions!.AutomaticDataSourceSelection, Is.True, "Letting an AI operation pick the sources is the one thing only a chat template can state, so it must not be lost on the way through Lua."); Assert.That(read.DataSourceOptions.PreselectedDataSourceIds, Is.Empty); Assert.That(read.ToolIds, Is.Null); } @@ -383,7 +383,7 @@ public sealed class ChatTemplateConfigurationTests using (Assert.EnterMultipleScope()) { Assert.That(ChatTemplate.GetPreselectedLocalDataSourceNames(eriOnly, ConfiguredDataSources()), Is.Empty); - Assert.That(ChatTemplate.GetPreselectedLocalDataSourceNames(agentic, ConfiguredDataSources()), Is.Empty, "An agent picks the sources per message, so this template names none to begin with."); + Assert.That(ChatTemplate.GetPreselectedLocalDataSourceNames(agentic, ConfiguredDataSources()), Is.Empty, "An AI operation picks the sources per message, so this template names none to begin with."); Assert.That(ChatTemplate.GetPreselectedLocalDataSourceNames(NewTemplate(), ConfiguredDataSources()), Is.Empty); } } diff --git a/app/Tests/Settings/ChatTemplatePrecedenceTests.cs b/app/Tests/Settings/ChatTemplatePrecedenceTests.cs index b8453fc96..3f6fe1231 100644 --- a/app/Tests/Settings/ChatTemplatePrecedenceTests.cs +++ b/app/Tests/Settings/ChatTemplatePrecedenceTests.cs @@ -11,7 +11,7 @@ namespace AIStudio.Tests.Settings; /// Either side can be filled in without knowing about the other, so all four combinations happen. /// The rule is deliberately the same for tools and for data sources: the chat template wins as a /// whole, because it is the only one of the two which can also leave the choice of sources to an -/// agent, and a field-by-field mix of both would be something neither of them asked for. +/// AI operation, and a field-by-field mix of both would be something neither of them asked for. ///
[TestFixture] public sealed class ChatTemplatePrecedenceTests @@ -115,7 +115,7 @@ public sealed class ChatTemplatePrecedenceTests using (Assert.EnterMultipleScope()) { - Assert.That(optionsChoice.Options!.AutomaticDataSourceSelection, Is.True, "Letting an agent pick the sources is the one thing a launcher cannot express, so it is exactly what must not be overwritten by one."); + Assert.That(optionsChoice.Options!.AutomaticDataSourceSelection, Is.True, "Letting an AI operation pick the sources is the one thing a launcher cannot express, so it is exactly what must not be overwritten by one."); Assert.That(optionsChoice.Options.PreselectedDataSourceIds, Is.Empty); Assert.That(optionsChoice.LauncherChoiceDropped, Is.True); } diff --git a/app/Tests/Settings/PreselectedProviderTests.cs b/app/Tests/Settings/PreselectedProviderTests.cs deleted file mode 100644 index 9eef82ebd..000000000 --- a/app/Tests/Settings/PreselectedProviderTests.cs +++ /dev/null @@ -1,217 +0,0 @@ -using AIStudio.Provider; -using AIStudio.Settings; - -using Microsoft.Extensions.Logging.Abstractions; - -namespace AIStudio.Tests.Settings; - -/// -/// Checks which provider an agent is handed when nobody picked one for it. -/// -/// -/// Agents such as the content cleaner or the security audit may be given a model of their own, -/// because a small and cheap one is enough for what they do. Almost nobody does that, so what -/// matters in practice is what happens when they have none: the model of the assistant they sit -/// in, the app-wide default, or nothing at all. Two bugs shipped in that fallback, and both of -/// them lived here rather than in the components -- which is why this is where they are pinned -/// down. The component lifecycle itself is not covered; there is no bUnit in this solution. -/// -/// Names are written out in full throughout. This assembly has an AIStudio.Tests.Tools and an -/// AIStudio.Tests.Provider of its own, and the app has an AIStudio.Components -- all three are -/// what a short name finds from here, and a using alias does not help, because names from the -/// enclosing namespaces win over it. -/// -[TestFixture] -public sealed class PreselectedProviderTests -{ - private const string ASSISTANT_PROVIDER_ID = "11111111-1111-1111-1111-111111111111"; - private const string AGENT_PROVIDER_ID = "22222222-2222-2222-2222-222222222222"; - private const string APP_DEFAULT_PROVIDER_ID = "33333333-3333-3333-3333-333333333333"; - - [Test] - public void ContentCleanerFallsBackToTheAssistantProvider() - { - var settingsManager = CreateSettingsManager(); - AddProvider(settingsManager, ASSISTANT_PROVIDER_ID, LLMProviders.OPEN_AI); - AddProvider(settingsManager, AGENT_PROVIDER_ID, LLMProviders.MISTRAL); - - var provider = settingsManager.GetPreselectedProvider(AIStudio.Tools.Components.AGENT_TEXT_CONTENT_CLEANER, ASSISTANT_PROVIDER_ID, true); - - Assert.That(provider.Id, Is.EqualTo(ASSISTANT_PROVIDER_ID), "With nothing configured for the cleaner, it has to use the model of the assistant around it."); - } - - [Test] - public void ContentCleanerFallsBackToTheAppDefault() - { - var settingsManager = CreateSettingsManager(); - AddProvider(settingsManager, ASSISTANT_PROVIDER_ID, LLMProviders.OPEN_AI); - AddProvider(settingsManager, APP_DEFAULT_PROVIDER_ID, LLMProviders.MISTRAL); - settingsManager.ConfigurationData.App.PreselectedProvider = APP_DEFAULT_PROVIDER_ID; - - var provider = settingsManager.GetPreselectedProvider(AIStudio.Tools.Components.AGENT_TEXT_CONTENT_CLEANER, null, true); - - Assert.That(provider.Id, Is.EqualTo(APP_DEFAULT_PROVIDER_ID), "Without an assistant model, the app-wide default is what is left before giving up."); - } - - [Test] - public void ContentCleanerPrefersItsOwnProviderOverTheAssistantOne() - { - var settingsManager = CreateSettingsManager(); - AddProvider(settingsManager, ASSISTANT_PROVIDER_ID, LLMProviders.OPEN_AI); - AddProvider(settingsManager, AGENT_PROVIDER_ID, LLMProviders.MISTRAL); - settingsManager.ConfigurationData.TextContentCleaner.PreselectAgentOptions = true; - settingsManager.ConfigurationData.TextContentCleaner.PreselectedAgentProvider = AGENT_PROVIDER_ID; - - var provider = settingsManager.GetPreselectedProvider(AIStudio.Tools.Components.AGENT_TEXT_CONTENT_CLEANER, ASSISTANT_PROVIDER_ID, true); - - Assert.That(provider.Id, Is.EqualTo(AGENT_PROVIDER_ID), "A model picked for the cleaner is the whole point of picking one, so it outranks the assistant's."); - } - - /// - /// Checks that the switch above the cleaner's provider field really turns that provider off. - /// - /// - /// The provider id stays in the settings when the switch goes off, so the only thing saying it - /// must not be used is this one flag. A component which reads the stored id instead of asking - /// here would keep using a provider the user switched away from. - /// - [Test] - public void ContentCleanerIgnoresItsOwnProviderWhenPreselectionIsOff() - { - var settingsManager = CreateSettingsManager(); - AddProvider(settingsManager, ASSISTANT_PROVIDER_ID, LLMProviders.OPEN_AI); - AddProvider(settingsManager, AGENT_PROVIDER_ID, LLMProviders.MISTRAL); - settingsManager.ConfigurationData.TextContentCleaner.PreselectAgentOptions = false; - settingsManager.ConfigurationData.TextContentCleaner.PreselectedAgentProvider = AGENT_PROVIDER_ID; - - var provider = settingsManager.GetPreselectedProvider(AIStudio.Tools.Components.AGENT_TEXT_CONTENT_CLEANER, ASSISTANT_PROVIDER_ID, true); - - Assert.That(provider.Id, Is.EqualTo(ASSISTANT_PROVIDER_ID), "With its preselection switched off, the cleaner has to fall back to the assistant's model."); - } - - /// - /// Checks that a model too untrusted for the cleaner is not used just because it is there. - /// - /// - /// This is the case the user meets as a hint next to the cleaner switch: a model is selected in - /// the assistant, and the cleaner still has none. Under TRUST_ALL every provider reaches MEDIUM - /// and a self-hosted one reaches HIGH, so a global minimum of HIGH separates the two. - /// - [Test] - public void ContentCleanerRejectsAnAssistantProviderBelowTheGlobalMinimum() - { - var settingsManager = CreateSettingsManager(); - AddProvider(settingsManager, ASSISTANT_PROVIDER_ID, LLMProviders.OPEN_AI); - AddProvider(settingsManager, AGENT_PROVIDER_ID, LLMProviders.MISTRAL); - settingsManager.ConfigurationData.Confidence.EnforceGlobalMinimumConfidence = true; - settingsManager.ConfigurationData.Confidence.GlobalMinimumConfidence = ConfidenceLevel.HIGH; - - var provider = settingsManager.GetPreselectedProvider(AIStudio.Tools.Components.AGENT_TEXT_CONTENT_CLEANER, ASSISTANT_PROVIDER_ID, true); - - Assert.That(provider, Is.EqualTo(AIStudio.Settings.Provider.NONE), "A provider the organization ruled out must not reach the cleaner through the assistant."); - } - - [Test] - public void ContentCleanerAcceptsAnAssistantProviderMeetingTheGlobalMinimum() - { - var settingsManager = CreateSettingsManager(); - AddProvider(settingsManager, ASSISTANT_PROVIDER_ID, LLMProviders.SELF_HOSTED); - AddProvider(settingsManager, AGENT_PROVIDER_ID, LLMProviders.MISTRAL); - settingsManager.ConfigurationData.Confidence.EnforceGlobalMinimumConfidence = true; - settingsManager.ConfigurationData.Confidence.GlobalMinimumConfidence = ConfidenceLevel.HIGH; - - var provider = settingsManager.GetPreselectedProvider(AIStudio.Tools.Components.AGENT_TEXT_CONTENT_CLEANER, ASSISTANT_PROVIDER_ID, true); - - Assert.That(provider.Id, Is.EqualTo(ASSISTANT_PROVIDER_ID), "A provider which clears the bar has to be handed over, or the hint would never go away."); - } - - /// - /// Checks that the audit agent's provider needs no switch to be used. - /// - /// - /// Unlike the content cleaner, the audit agent has no "preselect options" flag: an organization - /// rolls its provider out and that is what audits run with. A test which assumed the two agents - /// behaved alike would pass here for the wrong reason. - /// - [Test] - public void AuditAgentUsesItsOwnProviderWithoutAPreselectionSwitch() - { - var settingsManager = CreateSettingsManager(); - AddProvider(settingsManager, AGENT_PROVIDER_ID, LLMProviders.MISTRAL); - AddProvider(settingsManager, APP_DEFAULT_PROVIDER_ID, LLMProviders.OPEN_AI); - settingsManager.ConfigurationData.App.PreselectedProvider = APP_DEFAULT_PROVIDER_ID; - settingsManager.ConfigurationData.AssistantPluginAudit.PreselectedAgentProvider = AGENT_PROVIDER_ID; - - var provider = settingsManager.GetPreselectedProvider(AIStudio.Tools.Components.AGENT_ASSISTANT_PLUGIN_AUDIT, null, true); - - Assert.That(provider.Id, Is.EqualTo(AGENT_PROVIDER_ID), "A provider rolled out for audits outranks the app-wide default."); - } - - [Test] - public void AuditAgentFallsBackToTheAppDefault() - { - var settingsManager = CreateSettingsManager(); - AddProvider(settingsManager, ASSISTANT_PROVIDER_ID, LLMProviders.OPEN_AI); - AddProvider(settingsManager, APP_DEFAULT_PROVIDER_ID, LLMProviders.MISTRAL); - settingsManager.ConfigurationData.App.PreselectedProvider = APP_DEFAULT_PROVIDER_ID; - - var provider = settingsManager.GetPreselectedProvider(AIStudio.Tools.Components.AGENT_ASSISTANT_PLUGIN_AUDIT, null, true); - - Assert.That(provider.Id, Is.EqualTo(APP_DEFAULT_PROVIDER_ID), "Without a dedicated audit provider, the app-wide default is what audits run with."); - } - - /// - /// Checks the state the audit dialog was useless in before it offered a provider itself. - /// - [Test] - public void AuditAgentEndsUpWithNothingWhenNeitherIsConfigured() - { - var settingsManager = CreateSettingsManager(); - AddProvider(settingsManager, ASSISTANT_PROVIDER_ID, LLMProviders.OPEN_AI); - AddProvider(settingsManager, AGENT_PROVIDER_ID, LLMProviders.MISTRAL); - - var provider = settingsManager.GetPreselectedProvider(AIStudio.Tools.Components.AGENT_ASSISTANT_PLUGIN_AUDIT, null, true); - - Assert.That(provider, Is.EqualTo(AIStudio.Settings.Provider.NONE), "Two configured providers are not a choice: without one being named for audits, the agent has none."); - } - - [Test] - public void AuditAgentRejectsAnAppDefaultBelowTheGlobalMinimum() - { - var settingsManager = CreateSettingsManager(); - AddProvider(settingsManager, ASSISTANT_PROVIDER_ID, LLMProviders.SELF_HOSTED); - AddProvider(settingsManager, APP_DEFAULT_PROVIDER_ID, LLMProviders.OPEN_AI); - settingsManager.ConfigurationData.App.PreselectedProvider = APP_DEFAULT_PROVIDER_ID; - settingsManager.ConfigurationData.Confidence.EnforceGlobalMinimumConfidence = true; - settingsManager.ConfigurationData.Confidence.GlobalMinimumConfidence = ConfidenceLevel.HIGH; - - var provider = settingsManager.GetPreselectedProvider(AIStudio.Tools.Components.AGENT_ASSISTANT_PLUGIN_AUDIT, null, true); - - Assert.That(provider, Is.EqualTo(AIStudio.Settings.Provider.NONE), "The app-wide default is not exempt from what the organization enforces."); - } - - /// - /// Builds a settings manager the way these tests need it. - /// - /// - /// The rust service is handed in as null on purpose: resolving a provider never asks it - /// anything. It reads the configured providers, the confidence scheme and the preselections, - /// all of which are plain settings. Should that change, the test says so by failing loudly - /// rather than by quietly measuring something else. - /// - private static SettingsManager CreateSettingsManager() => new(NullLogger.Instance, null!); - - /// - /// Adds a provider to the settings. - /// - /// - /// Every test here configures at least two of them, and not for variety: with exactly one - /// configured provider, resolving takes a shortcut and returns it without looking at any - /// preselection. A single-provider test would pass no matter what the fallback does. - /// - private static void AddProvider(SettingsManager settingsManager, string id, LLMProviders llmProvider) - { - var providers = settingsManager.ConfigurationData.Providers; - providers.Add(new((uint)providers.Count + 1, id, $"Instance {providers.Count + 1}", llmProvider, new("test-model", null))); - } -} \ No newline at end of file diff --git a/app/Tests/Settings/ProhibitedProvidersTests.cs b/app/Tests/Settings/ProhibitedProvidersTests.cs index b152d4220..588b1a353 100644 --- a/app/Tests/Settings/ProhibitedProvidersTests.cs +++ b/app/Tests/Settings/ProhibitedProvidersTests.cs @@ -19,7 +19,7 @@ namespace AIStudio.Tests.Settings; /// /// The settings are reached through Program.SERVICE_PROVIDER, as in the app, because a managed /// setting writes its value and its lock there. Names are written out in full where a short one -/// would find a namespace of this assembly first, see PreselectedProviderTests. +/// would find a namespace of this assembly first, see AIOperationProviderResolverTests. /// [TestFixture] public sealed class ProhibitedProvidersTests diff --git a/app/Tests/Tools/ClassicRagOutboundDataRestrictionTests.cs b/app/Tests/Tools/ClassicRagOutboundDataRestrictionTests.cs index 923b854aa..f811db697 100644 --- a/app/Tests/Tools/ClassicRagOutboundDataRestrictionTests.cs +++ b/app/Tests/Tools/ClassicRagOutboundDataRestrictionTests.cs @@ -67,7 +67,7 @@ public sealed class ClassicRagOutboundDataRestrictionTests : ToolRegistryTestBas public void BothWaysOfSearchingRestrictTheChatAlike(IDataSource[] dataSources, int[] passageCounts, OutboundDataRestriction organizationMinimum) { // - // Semantic Search offers the data sources in a fixed order, while the selection agent of the + // Semantic Search offers the data sources in a fixed order, while the data source selection of the // classic process may return them in any order. Both have to name the same data source. // // AsEnumerable() keeps Reverse() a reversed copy: from C# 14 on, Reverse() on an array diff --git a/app/Tests/Tools/ClassicRagUnreachableTests.cs b/app/Tests/Tools/ClassicRagUnreachableTests.cs index 4099b9d08..ff42dab8c 100644 --- a/app/Tests/Tools/ClassicRagUnreachableTests.cs +++ b/app/Tests/Tools/ClassicRagUnreachableTests.cs @@ -61,7 +61,7 @@ public sealed class ClassicRagUnreachableTests { var unreachable = Checked([INTRANET, WIKI]).GetUnreachableOfTheChat(new DataSourceOptions { AutomaticDataSourceSelection = true }); - Assert.That(unreachable, Is.EqualTo(new[] { INTRANET, WIKI }), "The selection agent might have picked any of them."); + Assert.That(unreachable, Is.EqualTo(new[] { INTRANET, WIKI }), "The data source selection might have picked any of them."); } [Test] diff --git a/app/Tests/Tools/DataSourceParticipatingAgentsTests.cs b/app/Tests/Tools/DataSourceParticipatingAgentsTests.cs deleted file mode 100644 index 714b7c739..000000000 --- a/app/Tests/Tools/DataSourceParticipatingAgentsTests.cs +++ /dev/null @@ -1,51 +0,0 @@ -using AIStudio.Settings.DataModel; -using AIStudio.Tools.Services; - -namespace AIStudio.Tests.Tools; - -/// -/// Checks which agents count as seeing the data of the data sources. -/// -/// -/// Every provider which sees the data must be trusted enough for every data source it sees. That -/// cuts both ways: leaving out an agent which does run would send data to a provider trusted too -/// little, while counting an agent which does not run holds back data sources for no reason. The -/// classic RAG process runs its agents; Semantic Search runs none, since the chat model picks the -/// data sources and judges the passages itself. -/// -[TestFixture] -public sealed class DataSourceParticipatingAgentsTests -{ - [Test] - public void SemanticSearchRunsNoAgent() - { - var agents = DataSourceService.GetParticipatingAgents(Options(automaticSelection: true, automaticValidation: true), DataSourceRetrievalMode.SEMANTIC_SEARCH, retrievalContextValidationEnabled: true); - - Assert.That(agents, Is.Empty, "The chat provider alone sees the data, so its trust alone decides which data sources it may search."); - } - - [Test] - public void TheClassicRAGProcessCountsTheAgentsItRuns() - { - var agents = DataSourceService.GetParticipatingAgents(Options(automaticSelection: true, automaticValidation: true), DataSourceRetrievalMode.EVERY_MESSAGE, retrievalContextValidationEnabled: true); - - Assert.That(agents.Select(agent => agent.Component), Is.EqualTo(new[] { AIStudio.Tools.Components.AGENT_DATA_SOURCE_SELECTION, AIStudio.Tools.Components.AGENT_RETRIEVAL_CONTEXT_VALIDATION })); - } - - [Test] - public void TheClassicRAGProcessCountsNoAgentItDoesNotRun() - { - using (Assert.EnterMultipleScope()) - { - Assert.That(DataSourceService.GetParticipatingAgents(Options(automaticSelection: false, automaticValidation: false), DataSourceRetrievalMode.EVERY_MESSAGE, retrievalContextValidationEnabled: true), Is.Empty); - Assert.That(DataSourceService.GetParticipatingAgents(Options(automaticSelection: false, automaticValidation: true), DataSourceRetrievalMode.EVERY_MESSAGE, retrievalContextValidationEnabled: false), Is.Empty, "The validation of this chat is on, but the settings switch it off everywhere."); - } - } - - private static DataSourceOptions Options(bool automaticSelection, bool automaticValidation) => new() - { - DisableDataSources = false, - AutomaticDataSourceSelection = automaticSelection, - AutomaticValidation = automaticValidation, - }; -} \ No newline at end of file diff --git a/app/Tests/Tools/DataSourceParticipatingOperationsTests.cs b/app/Tests/Tools/DataSourceParticipatingOperationsTests.cs new file mode 100644 index 000000000..f1720b66c --- /dev/null +++ b/app/Tests/Tools/DataSourceParticipatingOperationsTests.cs @@ -0,0 +1,51 @@ +using AIStudio.Settings.DataModel; +using AIStudio.Tools.Services; + +namespace AIStudio.Tests.Tools; + +/// +/// Checks which AI operations count as seeing the data of the data sources. +/// +/// +/// Every provider which sees the data must be trusted enough for every data source it sees. That +/// cuts both ways: leaving out an operation which does run would send data to a provider trusted too +/// little, while counting an operation which does not run holds back data sources for no reason. The +/// classic RAG process runs its AI operations; Semantic Search runs none, since the chat model picks the +/// data sources and judges the passages itself. +/// +[TestFixture] +public sealed class DataSourceParticipatingOperationsTests +{ + [Test] + public void SemanticSearchRunsNoOperation() + { + var operations = DataSourceService.GetParticipatingOperations(Options(automaticSelection: true, automaticValidation: true), DataSourceRetrievalMode.SEMANTIC_SEARCH, retrievalContextValidationEnabled: true); + + Assert.That(operations, Is.Empty, "The chat provider alone sees the data, so its trust alone decides which data sources it may search."); + } + + [Test] + public void TheClassicRAGProcessCountsTheOperationsItRuns() + { + var operations = DataSourceService.GetParticipatingOperations(Options(automaticSelection: true, automaticValidation: true), DataSourceRetrievalMode.EVERY_MESSAGE, retrievalContextValidationEnabled: true); + + Assert.That(operations.Select(operation => operation.Component), Is.EqualTo(new[] { AIStudio.Tools.Components.AGENT_DATA_SOURCE_SELECTION, AIStudio.Tools.Components.AGENT_RETRIEVAL_CONTEXT_VALIDATION })); + } + + [Test] + public void TheClassicRAGProcessCountsNoOperationItDoesNotRun() + { + using (Assert.EnterMultipleScope()) + { + Assert.That(DataSourceService.GetParticipatingOperations(Options(automaticSelection: false, automaticValidation: false), DataSourceRetrievalMode.EVERY_MESSAGE, retrievalContextValidationEnabled: true), Is.Empty); + Assert.That(DataSourceService.GetParticipatingOperations(Options(automaticSelection: false, automaticValidation: true), DataSourceRetrievalMode.EVERY_MESSAGE, retrievalContextValidationEnabled: false), Is.Empty, "The validation of this chat is on, but the settings switch it off everywhere."); + } + } + + private static DataSourceOptions Options(bool automaticSelection, bool automaticValidation) => new() + { + DisableDataSources = false, + AutomaticDataSourceSelection = automaticSelection, + AutomaticValidation = automaticValidation, + }; +} \ No newline at end of file diff --git a/app/Tests/Tools/DataSourceRequirementsTests.cs b/app/Tests/Tools/DataSourceRequirementsTests.cs index 3d0072ab2..85bc4aeab 100644 --- a/app/Tests/Tools/DataSourceRequirementsTests.cs +++ b/app/Tests/Tools/DataSourceRequirementsTests.cs @@ -55,7 +55,7 @@ public sealed class DataSourceRequirementsTests using (Assert.EnterMultipleScope()) { Assert.That(DataSourceRequirements.Of([HANDBOOK, ARCHIVE], [1, 1], OutboundDataRestriction.UNRESTRICTED).OutboundData, Is.EqualTo(expected)); - Assert.That(DataSourceRequirements.Of([ARCHIVE, HANDBOOK], [1, 1], OutboundDataRestriction.UNRESTRICTED).OutboundData, Is.EqualTo(expected), "An agent may select the data sources in another order."); + Assert.That(DataSourceRequirements.Of([ARCHIVE, HANDBOOK], [1, 1], OutboundDataRestriction.UNRESTRICTED).OutboundData, Is.EqualTo(expected), "An AI operation may select the data sources in another order."); } } diff --git a/app/Tests/Tools/EmbeddingChangeImpactTests.cs b/app/Tests/Tools/EmbeddingChangeImpactTests.cs index c909dc32c..02962e0cf 100644 --- a/app/Tests/Tools/EmbeddingChangeImpactTests.cs +++ b/app/Tests/Tools/EmbeddingChangeImpactTests.cs @@ -191,7 +191,7 @@ public sealed class EmbeddingChangeImpactTests using (Assert.EnterMultipleScope()) { Assert.That(EditKeepingTheProvider(embeddingProvider, stored, stored with { Name = "Another name" }), Is.False, "The name is how the data source is offered, not how it was read."); - Assert.That(EditKeepingTheProvider(embeddingProvider, stored, stored with { Description = "Another description" }), Is.False, "The description is there for the agent which picks data sources."); + Assert.That(EditKeepingTheProvider(embeddingProvider, stored, stored with { Description = "Another description" }), Is.False, "The description is there for the AI operation which picks data sources."); Assert.That(EditKeepingTheProvider(embeddingProvider, stored, stored with { MaxMatches = 42 }), Is.False, "How many matches an answer may use is decided per query."); Assert.That(EditKeepingTheProvider(embeddingProvider, stored, stored with { ConfidenceLevel = ConfidenceLevel.HIGH }), Is.False, "The confidence level is enforced live on every request and changes no vector."); } diff --git a/app/Tests/Tools/ModelAnswerJsonTests.cs b/app/Tests/Tools/ModelAnswerJsonTests.cs index d9c832a07..8a46d3e9c 100644 --- a/app/Tests/Tools/ModelAnswerJsonTests.cs +++ b/app/Tests/Tools/ModelAnswerJsonTests.cs @@ -22,7 +22,7 @@ public sealed class ModelAnswerJsonTests """; /// - /// A data source selection as the agent is asked to write it. + /// A data source selection as the AI operation is asked to write it. /// private const string SELECTION = """ [ diff --git a/app/Tests/Tools/ToolCalling/SearchMailsToolTests.cs b/app/Tests/Tools/ToolCalling/SearchMailsToolTests.cs index 0d8784f95..863da48d6 100644 --- a/app/Tests/Tools/ToolCalling/SearchMailsToolTests.cs +++ b/app/Tests/Tools/ToolCalling/SearchMailsToolTests.cs @@ -321,7 +321,7 @@ public sealed class SearchMailsToolTests : ToolRegistryTestBase [Test] public void SemanticSearchNeverSeesAMailbox() { - Assert.That(typeof(IDataSource).IsAssignableFrom(typeof(DataSourceMailbox)), Is.False, "Semantic Search, classic RAG, and the agents take their data sources from DataSources, which holds only IDataSource. A mailbox has its own rules and tools."); + Assert.That(typeof(IDataSource).IsAssignableFrom(typeof(DataSourceMailbox)), Is.False, "Semantic Search, classic RAG, and the AI operations take their data sources from DataSources, which holds only IDataSource. A mailbox has its own rules and tools."); } // Stating its definition and reading its arguments needs none of the services the tool searches with: diff --git a/documentation/Tools.md b/documentation/Tools.md index 907208518..c406e2e6f 100644 --- a/documentation/Tools.md +++ b/documentation/Tools.md @@ -226,7 +226,7 @@ A call has to pass both the restriction and the free address choice, so with the Chats run in two places: in the chat of the app, and in the comparison series of the Model Comparison assistant, whose chats run as `Components.MODEL_COMPARISON_ASSISTANT`. `semantic_search` is visible in both, see `ToolVisibilityDefinition.AllowedComponents`; anywhere else, `GetEffectiveRetrievalModeAsync` answers `NOT_AVAILABLE_HERE`, and the data sources are searched with every message. The mode Answer Variance of the Model Comparison assistant runs as the same component, but its chats keep the data sources switched off, so the tool offers nothing there. -The tool offers the data sources of the chat which the provider may use. With the automatic selection switched on, those are all data sources the provider may use: the AI which selects is the chat model itself. No agent takes part, so `DataSourceService` counts only the chat provider when it decides what may be used, see `DataSourceRetrievalMode`. The description of the tool lists the offered data sources by ID, name, and kind, with their own description shortened to 500 characters. It names no page size: how many passages a page holds depends on how long they are, so each result tells whether a further page holds more. The description of an ERI data source comes from its server, so it goes through the prompt-injection filter before it gets there. The listed IDs are the only values `data_source_ids` accepts. +The tool offers the data sources of the chat which the provider may use. With the automatic selection switched on, those are all data sources the provider may use: the AI which selects is the chat model itself. No AI operation takes part, so `DataSourceService` counts only the chat provider when it decides what may be used, see `DataSourceRetrievalMode`. The description of the tool lists the offered data sources by ID, name, and kind, with their own description shortened to 500 characters. It names no page size: how many passages a page holds depends on how long they are, so each result tells whether a further page holds more. The description of an ERI data source comes from its server, so it goes through the prompt-injection filter before it gets there. The listed IDs are the only values `data_source_ids` accepts. An ERI data source has a single page of matches, see `IDataSource.GetLastPage`, and asks its server for exactly as many as the classic process does. ERI v1 knows no offset, so a further page would have to ask for all pages before it as well, and a server which allows only the configured number of matches would refuse it: the model would hear that the data source could not be searched rather than that there is nothing more. When these matches do not fit into one search, the model still turns pages within them, and each page asks the server again. @@ -236,11 +236,11 @@ Every check of an ERI data source signs in to its server, and one message checks The data sources are checked again before each search, since rounds may have passed since they were offered, and then searched in parallel. A data source which fails is reported as not searched rather than left out, so that the model does not take its silence for finding nothing. Every passage goes through the same filter and into the same shape as with the classic RAG process, `RetrievalContextExtensions.PrepareForModelAsync`: all passages of a search in one filter request, within one `PromptInjectionGuardService.BeginAction` per search, so that the user hears about what was filtered once per search, as soon as it is done. A page of the search holds passages up to 100,000 characters, measured after the filter, which can make a passage longer. A data source returns its matches in pages of its own, as many as it is set to return, see `RetrievalPaging`; each of them is cut into one or more pages of the search, numbered on across the pages of the data source, see `SemanticSearchTool.SearchAsync`. Where everything fits, both are the same. `has_more` is exact: when a page ends with a page of the data source which might have more, the search looks whether a further one holds any passage. A passage longer than a whole page is shortened, its surrounding content first, and filtered again, see `RetrievalContextExtensions.ShortenToFitAsync`; its label tells the model, and the user is shown the shorter passage. A search of several data sources shares the first page among them. The data sources take turns: first the best passage of each, then the second best of each, and a data source stops at its first passage which no longer fits. Otherwise, the data source listed first would take the whole budget, or a shorter passage would take the place of a longer one above it. What does not fit is counted in the result, with a search of that data source alone, from page 1, as the way out; that search shows the passages read already once more. An image an ERI server returns is not passed on, in neither process: written as base64 text, it is nothing a model can look at, and it would take more room than all other passages together. The passage tells the model that an image matched and where it is, so that it can point the user to it. What an ERI server says its content is, its category, is passed on as "Source category". The passages become sources through `IRetrievalContext.ToSources()`, as with the classic process, and only the data sources whose passages reached the model raise the requirements of the chat. The passages which reached the model are also kept with the answer, through `ToolExecutionResult.Passages` and `ContentText.AddSources`: the result of the call is not saved, but the user can still read what the answer rests on after the chat was reloaded. The title of a source names the pages of all its passages, see `SourcePassageExtensions.NamePassagesInTitles`. -The classic process sends its passages along with every message, in the system prompt, and a provider refuses a message which exceeds the context window of the model. Its passages therefore get a budget, `PassageBudget`: half of the context window when it is known, `ModelProfile.Context`, counted in tokens through `ConversationTokenCounter` with the tokenizer of the provider, or the built-in one; otherwise 100,000 characters, as many as one page of `semantic_search`. When the tokenizer does not answer, characters count against the same limit, which leaves the passages less room rather than more. The budget applies to what the validation agent left, measured after the filter, each passage with the longest header it can get. The data sources take turns as in a search of several data sources, but a passage which does not fit is skipped, and the next ones still get their chance: there is no further page which could bring it later. A passage longer than the whole budget is shortened and filtered again, as in `semantic_search`. The model reads the passages grouped by data source, followed by how many were left out, and the user gets a warning with every answer which had to do without some, naming the ways out: Semantic Search, a lower token limit, or fewer data sources. Only the passages the model received are listed with the answer. +The classic process sends its passages along with every message, in the system prompt, and a provider refuses a message which exceeds the context window of the model. Its passages therefore get a budget, `PassageBudget`: half of the context window when it is known, `ModelProfile.Context`, counted in tokens through `ConversationTokenCounter` with the tokenizer of the provider, or the built-in one; otherwise 100,000 characters, as many as one page of `semantic_search`. When the tokenizer does not answer, characters count against the same limit, which leaves the passages less room rather than more. The budget applies to what the retrieval context validation left, measured after the filter, each passage with the longest header it can get. The data sources take turns as in a search of several data sources, but a passage which does not fit is skipped, and the next ones still get their chance: there is no further page which could bring it later. A passage longer than the whole budget is shortened and filtered again, as in `semantic_search`. The model reads the passages grouped by data source, followed by how many were left out, and the user gets a warning with every answer which had to do without some, naming the ways out: Semantic Search, a lower token limit, or fewer data sources. Only the passages the model received are listed with the answer. **Where a chat may send data afterward.** A data source holds the documents of the user or of their organization, so each one decides, as a mailbox does, where a chat may still send data once a search found something in it, `IDataSource.OutboundDataRestriction`, see "Outbound Data Restrictions" above. New data sources start with `ONLY_LINKS_FROM_CHAT`, the level of internal pages, and so do the ones saved before the setting existed. What counts is the effective level, `DataSourceOutboundDataExtensions.GetEffectiveOutboundDataRestriction`: the level of the data source, tightened by the minimum of the organization, `DataSourceSecuritySettings.MinimumOutboundDataRestriction`, and to `ONLY_CONFIGURED_SERVICES` for an ERI data source whose security policy is `SELF_HOSTED`. Its data must not leave the infrastructure of the organization through a tool either, while its links into the intranet stay readable: that level still allows the wiki and the allowed private hosts. The rule holds at runtime, so neither a data source saved earlier nor one a configuration plugin provides has to be edited for it; the dialogs only stop offering the less strict levels. -Both ways of searching ask one place what their passages demand, `DataSourceRequirements.Of`, with the data sources and the number of passages each one returned. Only the data sources with passages count, and the strictest effective level wins. On a tie, the data source which comes first by number, then by ID, is the one the chat names, so both ways name the same one, whatever order they searched in. The classic process asks right after the augmentation, with the passages the model receives. A passage which the validation agent drops, or which does not fit into the budget of the model, raises nothing: neither the model nor any of its tools ever sees it, and the validation agent which reads it has no tools. Otherwise, a data source of public papers could fill the budget while the passages of a confidential one stay out, and the chat would still lose the web search for good. A validation which fails hands every passage on, and one which is canceled ends the answer before any passage is sent. It sets the restriction on the chat before the request puts its tools together, so the restriction holds for the very answer the passages were found for. Provider confidence and data security stay as they were in the classic process, per selected data source and before retrieval, because its agents see the data. +Both ways of searching ask one place what their passages demand, `DataSourceRequirements.Of`, with the data sources and the number of passages each one returned. Only the data sources with passages count, and the strictest effective level wins. On a tie, the data source which comes first by number, then by ID, is the one the chat names, so both ways name the same one, whatever order they searched in. The classic process asks right after the augmentation, with the passages the model receives. A passage which the retrieval context validation drops, or which does not fit into the budget of the model, raises nothing: neither the model nor any of its tools ever sees it, and the retrieval context validation which reads it has no tools. Otherwise, a data source of public papers could fill the budget while the passages of a confidential one stay out, and the chat would still lose the web search for good. A validation which fails hands every passage on, and one which is canceled ends the answer before any passage is sent. It sets the restriction on the chat before the request puts its tools together, so the restriction holds for the very answer the passages were found for. Provider confidence and data security stay as they were in the classic process, per selected data source and before retrieval, because its AI operations see the data. ## Searching Mailboxes