From 5d91e7c414479c73e494b0c4f9a4b0669af90719 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Sun, 23 Feb 2025 15:04:59 +0100 Subject: [PATCH] Improved the parallelization number handling by considering wherever agent options are preselected --- .../Agents/AgentRetrievalContextValidation.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/MindWork AI Studio/Agents/AgentRetrievalContextValidation.cs b/app/MindWork AI Studio/Agents/AgentRetrievalContextValidation.cs index e996e2c7..3f4bf4c2 100644 --- a/app/MindWork AI Studio/Agents/AgentRetrievalContextValidation.cs +++ b/app/MindWork AI Studio/Agents/AgentRetrievalContextValidation.cs @@ -159,7 +159,10 @@ public sealed class AgentRetrievalContextValidation (ILogger>(retrievalContexts.Count); // Read the number of parallel validations: - var numParallelValidations = this.SettingsManager.ConfigurationData.AgentRetrievalContextValidation.NumParallelValidations; + 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: