@attribute [Route(Routes.ASSISTANT_BATCH_PROCESSING)] @inherits AssistantBaseCore @using AIStudio.Settings.DataModel @using AIStudio.Tools.Rust @T("Input") @T("Restore default patterns") @T("Supported audio and video files are transcribed automatically without an additional dialog. Each transcript is stored next to its media file as '.transcript.md' and reused when an interrupted run is continued.") @if (this.includeSubdirectories) { @T("A separate output folder is excluded from document discovery. This includes the default 'ai-results' folder, so results from an earlier run are not processed again. If the input folder itself is used for output, known batch result files are excluded instead.") } @T("Instructions") @foreach (var source in Enum.GetValues()) { @source.Name() } @if (this.promptSource is BatchProcessingPromptSource.FREE_PROMPT) { } else if (this.promptSource is BatchProcessingPromptSource.FILE_IMPORT) { @if (!string.IsNullOrWhiteSpace(this.promptFilePath)) { @(string.Format(T("Configured instructions file: {0}"), this.promptFilePath)) } @if (!string.IsNullOrWhiteSpace(this.promptFileLoadIssue)) { @this.promptFileLoadIssue } @T("The content of the selected file is used as the instructions for every single document of the batch run.") } else { @if (this.ConfiguredPolicyIsMissing) { @T("The configured default policy no longer exists. Please select another document analysis policy.") } @if (this.SettingsManager.ConfigurationData.DocumentAnalysis.Policies.Count is 0) { @T("You have not yet created any document analysis policies. Please use the Document Analysis Assistant to create a policy first.") @T("Open the Document Analysis Assistant") } else { @foreach (var policy in this.SettingsManager.ConfigurationData.DocumentAnalysis.Policies) { @policy.PolicyName } @if (this.selectedPolicy is not null && !string.IsNullOrWhiteSpace(this.selectedPolicy.PolicyDescription)) { @this.selectedPolicy.PolicyDescription } } } @T("Output") @foreach (var mode in Enum.GetValues()) { @mode.Name() } @if (this.outputMode is BatchProcessingOutputMode.MARKDOWN_FILES) { @T("Each answer is stored as its own Markdown file. Those files are named after the document, e.g., the answer for report.pdf is stored as report_result.md.") } else { @foreach (var separator in Enum.GetValues()) { @separator.Name() } @if (this.csvSeparator is BatchProcessingCsvSeparator.CUSTOM) { } } @T("We always write a semicolon-separated log named log.csv, which lists every document with its processing time, the model, the status, and the details of any error. When you start another run on the same output folder, we ask you whether to continue that run: documents which failed or are missing in the log are then processed again. When no output folder is selected, everything is written to the subfolder 'ai-results' within the input folder.") @T("Processing pace") @if (MinimumDelayIsManaged) { @(string.Format(T("Your organization requires a pause of at least {0} seconds between files."), this.ManagedMinimumDelaySeconds)) } else { } @T("Before the next file starts, AI Studio waits for a random number of whole seconds from this interval. The minimum is always 6 seconds and the maximum is 300 seconds (5 minutes). Restored files and the end of a run do not add another pause.") @if (this.pauseBeforeNextFileSeconds > 0) { @(string.Format(T("Waiting {0} seconds before starting the next file."), this.pauseBeforeNextFileSeconds)) } @if (this.fileResults.Count > 0) { @T("Progress") @(string.Format(T("{0} of {1} files processed"), this.numProcessedFiles, this.fileResults.Count)) @if (this.isProcessingBatch) { @T("Cancel the batch run") } @T("Status") @T("File") @T("Details") @foreach (var fileResult in this.fileResults) { @switch (fileResult.Status) { case BatchProcessingFileStatus.QUEUED: break; case BatchProcessingFileStatus.PROCESSING: break; case BatchProcessingFileStatus.DONE: break; case BatchProcessingFileStatus.FAILED: break; case BatchProcessingFileStatus.CANCELED: break; } @fileResult.RelativePath @fileResult.Message } }