Table of Contents

Constructor Summarizer

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

Summarizer(LM)

Initializes a new instance of the Summarizer class with the specified language model.

public Summarizer(LM model)

Parameters

model LM

The language model to be used for summarization.

Examples

// Constructing a Summarizer after loading a model and verifying its usability.
var model = LM.LoadFromModelID("lmkit-tasks:4b-preview");
var summarizer = new LMKit.TextGeneration.Summarizer(model);

Console.WriteLine("Summarizer initialized. Model name: " + summarizer.Model.Name);
Console.WriteLine("Context Length: " + summarizer.MaximumContextLength);

Remarks

This summarizer supports multiple content types, including plain text, images, PDF documents, HTML files, and Microsoft Office formats (DOCX, XLSX, PPTX).

Exceptions

ArgumentNullException

Thrown if the provided model is null.

InvalidModelException

Thrown when the model is an embedding model or has been loaded without weights.