mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-12-06 03:51:36 +00:00
Improved the pauses between indexing steps and between files of the Batch Processing Assistant (#1240)
This commit is contained in:
1 parent
a117074972
commit
899139c88b
32 files changed
+787
-425
No files matched your search
+4
-4
@@ -119,7 +119,7 @@ public partial class AssistantBatchProcessing
|
||||
{
|
||||
this.isProcessingBatch = true;
|
||||
var stopwatch = Stopwatch.StartNew();
|
||||
var delayRange = this.GetEffectiveDelayRange();
|
||||
var pauseRange = this.EffectivePauseRange;
|
||||
this.Logger.LogInformation(
|
||||
"Batch processing started. InputDirectory='{InputDirectory}', OutputDirectory='{OutputDirectory}', TotalFiles={TotalFiles}, RestoredFiles={RestoredFiles}, Model='{Model}', MinimumDelaySeconds={MinimumDelaySeconds}, MaximumDelaySeconds={MaximumDelaySeconds}.",
|
||||
this.inputDirectory,
|
||||
@@ -127,8 +127,8 @@ public partial class AssistantBatchProcessing
|
||||
this.fileResults.Count,
|
||||
this.fileResults.Count(fileResult => fileResult.Status is BatchProcessingFileStatus.DONE),
|
||||
this.ProviderSettings.Model,
|
||||
delayRange.Minimum,
|
||||
delayRange.Maximum);
|
||||
pauseRange.MinimumSeconds,
|
||||
pauseRange.MaximumSeconds);
|
||||
|
||||
// We use the cancellation token of the assistant base class, which
|
||||
// creates it before it calls us and disposes it after we returned.
|
||||
@@ -166,7 +166,7 @@ public partial class AssistantBatchProcessing
|
||||
|
||||
var anotherFileIsWaiting = this.fileResults.Skip(index + 1).Any(nextFile => nextFile.Status is not BatchProcessingFileStatus.DONE);
|
||||
if (anotherFileIsWaiting)
|
||||
await this.WaitBeforeNextFileAsync(delayRange.Minimum, delayRange.Maximum, token);
|
||||
await this.WaitBeforeNextFileAsync(pauseRange, token);
|
||||
}
|
||||
}
|
||||
finally
|
||||
|
||||
Reference in new issue
Block a user