Table of Contents

Interface ITextGenerationSettings

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

Represents the settings used to control text generation behavior. This includes specifying the sampling strategy, repetition penalties, stop sequences, and optional grammar enforcement for structured and controlled output.

public interface ITextGenerationSettings

Properties

Grammar

Gets or sets the Grammar object used to enforce grammatical rules during text generation. This allows for controlled and structured output from the model.

LogitBias

A LogitBias object for adjusting the likelihood of specific tokens during text generation.

MaximumCompletionTokens

Defines the maximum number of tokens (text chunks) permitted for text completion or generation.

RepetitionPenalty

Gets the RepetitionPenalty object that specifies the rules for repetition penalties applied during text completion.

SamplingMode

Gets or sets the TokenSampling object that specifies the sampling strategy used during text completion.

StopSequences

Gets the list of sequences that will cause the API to stop generating additional tokens (or text chunks). The resultant text completion will exclude any occurrences of the specified stop sequences.