mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-08-11 23:12:10 +00:00
The assistant processes all documents of a folder in one batch run. Each document is extracted to Markdown by the Rust runtime and sent to the selected provider together with the user's instructions. The instructions come from one of three sources: a free prompt, one of the existing document analysis policies including its minimum provider confidence, or a file the user imports. The output is either one Markdown file per document, or one CSV results table in which each answer becomes a row. The user can name the results table; its columns are the document and the answer. Every run writes a log named log.csv with the document, time, model, status, and the reason for any error. When a later run finds a log in the output folder, the assistant asks whether to continue it. Continuing processes only the documents that failed or whose results no longer exist, which recovers runs interrupted by a crash or by documents exceeding the context window of the model. A single failing document never stops the run, and the run can be canceled at any time. Columns are separated by a vertical bar and quoted per RFC 4180, so that the files open in spreadsheet applications regardless of the list separator of the user. Documents are identified by their path relative to the input folder, because two subfolders may contain a document of the same name. Includes the English and German localization. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
14 lines
650 B
C#
14 lines
650 B
C#
namespace AIStudio.Assistants.BatchProcessing;
|
|
|
|
public static class BatchProcessingOutputModeExtensions
|
|
{
|
|
private static string TB(string fallbackEN) => Tools.PluginSystem.I18N.I.T(fallbackEN, typeof(BatchProcessingOutputModeExtensions).Namespace, nameof(BatchProcessingOutputModeExtensions));
|
|
|
|
public static string Name(this BatchProcessingOutputMode outputMode) => outputMode switch
|
|
{
|
|
BatchProcessingOutputMode.MARKDOWN_FILES => TB("One Markdown file per document"),
|
|
BatchProcessingOutputMode.TABLE_ONLY => TB("One CSV results table, where each answer becomes one row"),
|
|
|
|
_ => TB("Unknown output mode"),
|
|
};
|
|
} |