@attribute [Route(Routes.ASSISTANT_BATCH_PROCESSING)] @inherits AssistantBaseCore @using AIStudio.Settings.DataModel @T("Input") @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 { } @T("We always write a log named log.csv, which lists every document with its processing time, the model, the status, and the details of any error. Its columns are separated by a vertical bar, so you can open it with any spreadsheet application. 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.") @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 } }