Improved the parallelization number handling by considering wherever agent options are preselected

This commit is contained in:
Thorsten Sommer 2025-02-23 15:04:59 +01:00
parent 06e9f8c170
commit 5d91e7c414
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -159,7 +159,10 @@ public sealed class AgentRetrievalContextValidation (ILogger<AgentRetrievalConte
var validationTasks = new List<Task<RetrievalContextValidationResult>>(retrievalContexts.Count); var validationTasks = new List<Task<RetrievalContextValidationResult>>(retrievalContexts.Count);
// Read the number of parallel validations: // 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); numParallelValidations = Math.Max(1, numParallelValidations);
// Use a semaphore to limit the number of parallel validations: // Use a semaphore to limit the number of parallel validations: