Class SessionConfig
public sealed class SessionConfig : LiteRTLMNativeHandle
- Inheritance
-
objectSessionConfig
- Inherited Members
Constructors
SessionConfig()
Creates a managed wrapper around a LiteRT LM session configuration. The caller is responsible for disposing the wrapper using Dispose().
public SessionConfig()
Exceptions
- InvalidOperationException
Thrown if the native object could not be created.
Methods
ReleaseUnmanagedResources()
protected override void ReleaseUnmanagedResources()
SetApplyPromptTemplate(bool)
Sets whether to apply the prompt template for this session.
public void SetApplyPromptTemplate(bool applyPromptTemplate)
Parameters
applyPromptTemplateboolWhether to apply the prompt template.
SetAudioLoraPath(string)
Sets the path to the audio LoRA weights file.
public int SetAudioLoraPath(string audioLoraPath)
Parameters
audioLoraPathstringThe path to the audio LoRA weights file.
Returns
- int
0 on success, non-zero on failure.
SetLoraPath(string)
Sets the path to the LoRA weights file.
public int SetLoraPath(string loraPath)
Parameters
loraPathstringThe path to the text LoRA weights file.
Returns
- int
0 on success, non-zero on failure.
SetMaxOutputTokens(int)
Sets the maximum number of output tokens per decode step for this session.
public void SetMaxOutputTokens(int maxOutputTokens)
Parameters
maxOutputTokensintThe maximum number of output tokens.
SetSamplerParams(SamplerParams)
Sets the sampler parameters for this session configuration.
public void SetSamplerParams(SamplerParams samplerParams)
Parameters
samplerParamsSamplerParamsThe sampler parameters to use.