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
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 isnull
.- InvalidModelException
Thrown when the provided
model
does not meet the required specifications or is incompatible with the TextTranslation service.