Table of Contents

Class TranslatorAgentTemplate

Namespace
LMKit.Agents.Templates
Assembly
LM-Kit.NET.dll

A template for creating translation agents.

Translator agents excel at translating text between languages while preserving meaning, tone, and domain-specific terminology.

public sealed class TranslatorAgentTemplate : AgentTemplate
Inheritance
TranslatorAgentTemplate
Inherited Members

Examples

var agent = new TranslatorAgentTemplate()
    .WithModel(model)
    .WithSourceLanguage("English")
    .WithTargetLanguage("French")
    .WithDomain(TranslationDomain.Legal)
    .WithFormality(FormalityLevel.Formal)
    .Build();

var result = await agent.RunAsync("Translate: The agreement shall be binding...");

Properties

TemplateName

Gets the template name.

Methods

ConfigureBuilder(AgentBuilder)

Configures the agent builder with template-specific settings.

WithAlternatives(bool)

Sets whether to include alternative translations.

WithDomain(TranslationDomain)

Sets the translation domain for terminology.

WithFormality(FormalityLevel)

Sets the formality level.

WithGlossary(string)

Sets a custom glossary of terms.

WithModel(LM)

Sets the model for the agent.

WithPreserveFormatting(bool)

Sets whether to preserve original formatting.

WithSourceLanguage(string)

Sets the source language.

WithTargetLanguage(string)

Sets the target language.