Table of Contents

Constructor PdfChat

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

PdfChat(LM, LM, int)

Initializes a new instance using separate chat and embedding models.

public PdfChat(LM chatModel, LM embeddingModel, int contextSize = -1)

Parameters

chatModel LM

The language model for generating responses.

embeddingModel LM

The model for computing text embeddings used during document retrieval.

contextSize int

Token context size override, or -1 to let the runtime select an optimal size based on hardware and model configuration.

Exceptions

ArgumentNullException

Thrown if chatModel or embeddingModel is null.

PdfChat(LM, LM, IVectorStore, int)

Initializes a new instance using separate chat and embedding models with an optional vector store for caching.

public PdfChat(LM chatModel, LM embeddingModel, IVectorStore vectorStore, int contextSize = -1)

Parameters

chatModel LM

The language model for generating responses.

embeddingModel LM

The model for computing text embeddings used during document retrieval.

vectorStore IVectorStore

Optional vector store for caching document embeddings, or null to disable caching. When provided, processed documents are cached and reused on subsequent loads.

contextSize int

Token context size override, or -1 to let the runtime select an optimal size based on hardware and model configuration.

Exceptions

ArgumentNullException

Thrown if chatModel or embeddingModel is null.