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
modelargument is null, indicating that a valid model is required to create a SingleTurnConversation instance.- InvalidModelException
Thrown when the provided
modeldoes 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
modelLMThe LM object representing the language model to be used for inference. Cannot be
null.textGenerationSettingsITextGenerationSettingsAn 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
modelisnull, indicating that a valid model is required.- InvalidModelException
Thrown if
modelis an embedding model or has been loaded without weights, indicating that it is incompatible with SingleTurnConversation.