Table of Contents

Constructor SingleTurnConversation

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

SingleTurnConversation(LM)

Creates an instance of the SingleTurnConversation class.

public SingleTurnConversation(LM model)

Parameters

model LM

A LM object that specifies the model to be inferred by the instance.

Exceptions

ArgumentNullException

Thrown when the provided model argument is null, indicating that a valid model is required to create a SingleTurnConversation instance.

InvalidModelException

Thrown when the provided model does not meet the required specifications or is incompatible with the SingleTurnConversation service, necessitating a review or update of the model selection.

SingleTurnConversation(LM, ITextGenerationSettings)

Initializes a new SingleTurnConversation instance using the specified language model and text-generation settings. This constructor configures the conversation for single-turn interactions, applying any provided ITextGenerationSettings.

public SingleTurnConversation(LM model, ITextGenerationSettings textGenerationSettings)

Parameters

model LM

The LM object representing the language model to be used for inference. Cannot be null.

textGenerationSettings ITextGenerationSettings

An ITextGenerationSettings instance containing custom parameters for text generation (e.g., sampling mode, repetition penalty). May be null, in which case default settings are applied.

Exceptions

ArgumentNullException

Thrown if model is null, indicating that a valid model is required.

InvalidModelException

Thrown if model is an embedding model or has been loaded without weights, indicating that it is incompatible with SingleTurnConversation.