Constructor PdfChat
PdfChat(LM, LM, int)
Initializes a new instance using separate chat and embedding models.
public PdfChat(LM chatModel, LM embeddingModel, int contextSize = -1)
Parameters
chatModelLMThe language model for generating responses.
embeddingModelLMThe model for computing text embeddings used during document retrieval.
contextSizeintToken context size override, or
-1to let the runtime select an optimal size based on hardware and model configuration.
Exceptions
- ArgumentNullException
Thrown if
chatModelorembeddingModelisnull.
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
chatModelLMThe language model for generating responses.
embeddingModelLMThe model for computing text embeddings used during document retrieval.
vectorStoreIVectorStoreOptional vector store for caching document embeddings, or
nullto disable caching. When provided, processed documents are cached and reused on subsequent loads.contextSizeintToken context size override, or
-1to let the runtime select an optimal size based on hardware and model configuration.
Exceptions
- ArgumentNullException
Thrown if
chatModelorembeddingModelisnull.