mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-08-11 20:52:11 +00:00
59 lines
2.0 KiB
C#
59 lines
2.0 KiB
C#
|
|
namespace AIStudio.Assistants.BatchProcessing;
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// The result of processing one file within a batch run.
|
||
|
|
/// </summary>
|
||
|
|
public sealed class BatchProcessingFileResult
|
||
|
|
{
|
||
|
|
/// <summary>
|
||
|
|
/// The absolute path of the processed file.
|
||
|
|
/// </summary>
|
||
|
|
public required string FilePath { get; init; }
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// The file name of the processed file.
|
||
|
|
/// </summary>
|
||
|
|
public required string FileName { get; init; }
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// The path of the file relative to the input folder. For files directly
|
||
|
|
/// inside the input folder, this is the file name.
|
||
|
|
/// </summary>
|
||
|
|
/// <remarks>
|
||
|
|
/// This is the identity of the document within a batch run: it is written
|
||
|
|
/// to the log and is used to recognize the document when a previous run is
|
||
|
|
/// continued. The file name alone would not be sufficient, because two
|
||
|
|
/// subfolders may contain a document of the same name.
|
||
|
|
/// </remarks>
|
||
|
|
public required string RelativePath { get; init; }
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// The processing state of the file.
|
||
|
|
/// </summary>
|
||
|
|
public BatchProcessingFileStatus Status { get; set; } = BatchProcessingFileStatus.QUEUED;
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// An optional message, e.g., the error message when the processing failed.
|
||
|
|
/// </summary>
|
||
|
|
public string Message { get; set; } = string.Empty;
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// The AI answer for this file.
|
||
|
|
/// </summary>
|
||
|
|
public string ResultText { get; set; } = string.Empty;
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// The model which produced the answer for this file.
|
||
|
|
/// </summary>
|
||
|
|
/// <remarks>
|
||
|
|
/// We store the model per file instead of reading the currently selected
|
||
|
|
/// model when writing the results table. Otherwise, changing the model
|
||
|
|
/// between two batch runs would relabel the rows of the previous run.
|
||
|
|
/// </remarks>
|
||
|
|
public string ModelName { get; set; } = string.Empty;
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// The time when the processing of this file finished.
|
||
|
|
/// </summary>
|
||
|
|
public DateTimeOffset ProcessedAt { get; set; }
|
||
|
|
}
|