Table of Contents

Enum DocumentImportPhase

Namespace
LMKit.Retrieval.Events
Assembly
LM-Kit.NET.dll

Defines the phases of document import operations.

public enum DocumentImportPhase

Fields

PageProcessingStarted = 0

A page has started processing.

PageProcessingCompleted = 1

A page has completed processing.

EmbeddingStarted = 2

Embedding generation has started.

EmbeddingCompleted = 3

Embedding generation has completed.

Examples

pdfChat.DocumentImportProgress += (sender, e) =>
{
    switch (e.Phase)
    {
        case DocumentImportPhase.PageProcessingStarted:
            Console.WriteLine($"Processing page {e.PageIndex + 1}...");
            break;
        case DocumentImportPhase.PageProcessingCompleted:
            Console.WriteLine($"Page {e.PageIndex + 1} done.");
            break;
        case DocumentImportPhase.EmbeddingStarted:
            Console.WriteLine($"Embedding {e.SectionCount} sections...");
            break;
        case DocumentImportPhase.EmbeddingCompleted:
            Console.WriteLine("Embedding complete.");
            break;
    }
};
Share