Table of Contents

Constructor TextTranslation

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

TextTranslation(LLM)

Initializes a new instance of the TextTranslation class.

public TextTranslation(LLM model)

Parameters

model LLM

A LLM object that specifies the LLM model to be inferred by the instance; cannot be null.

Examples

using LMKit.Translation;
using LMKit.Model;

// Initialize the language model (LLM)
LLM languageModel = new LLM("path/to/your/model");

// Create an instance of TextTranslation using the LLM
TextTranslation textTranslation = new TextTranslation(languageModel);

Exceptions

ArgumentNullException

Thrown when the provided model argument is null.

InvalidModelException

Thrown when the provided model does not meet the required specifications or is incompatible with the TextTranslation service.