Constructor SingleTurnConversation
- Namespace
- LMKit.TextGeneration
- Assembly
- LM-Kit.NET.dll
SingleTurnConversation(LM)
Creates an instance of the SingleTurnConversation class.
public SingleTurnConversation(LM model)
Parameters
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
LMThe LM object representing the language model to be used for inference. Cannot be
null
.textGenerationSettings
ITextGenerationSettingsAn 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
isnull
, 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.